================
@@ -75,13 +75,16 @@ void errno_mkdtemp(char *template) {
   }
 }
 
-void errno_getcwd(char *Buf, size_t sz) {
-  char *Path = getcwd(Buf, sz);
-  if (Path == NULL) {
-    clang_analyzer_eval(errno != 0);      // expected-warning{{TRUE}}
-    if (errno) {}                         // no warning
+void errno_getcwd_general(char *Buf, size_t Sz) {
+  char *Path = getcwd(Buf, Sz);
+  if (Sz == 0) {
+    clang_analyzer_eval(errno != 0);  // expected-warning{{TRUE}}
----------------
balazske wrote:

clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}}

https://github.com/llvm/llvm-project/pull/77040
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to