[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue May 20 03:06:56 PDT 2025
================
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) {
clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}
if (errno) {} // no warning
- } else if (Path == NULL) {
- clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
- if (errno) {} // no warning
----------------
steakhal wrote:
@balazske I wasnt sure about the "add extra cases" part. But I added the NotNull constraints to the existing Cases in 039952f6517c6e732fb5ce578291a35668c46c7b
WDTY now of this patch?
https://github.com/llvm/llvm-project/pull/135720
More information about the cfe-commits
mailing list