================ @@ -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:
Alright. I think I understand this now. Because of `ReturnValueCondition(BO_EQ, ArgNo(0))` on the success path we assume that the returned pointer is the same (aka. equal to) the first argument, which means that `Path` holds the same pointer as `Buf`. Because of this, dropping the `ArgConstraint(NotNull(ArgNo(0)))` means that no longer affects the return value `Path`. This is actually a good thing. Could you please help me how does the test failure look like for you if you would keep this hunk? https://github.com/llvm/llvm-project/pull/135720 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits