https://github.com/benshi001 closed
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/balazske approved this pull request.
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -248,3 +248,25 @@ void check_fflush_all(void) {
if (errno) {}// no-warning
}
}
+
+void check_opendir(const char *Path) {
+ DIR *Dir = opendir(Path);
+ if (Dir == NULL) {
+clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
+if (er
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -248,3 +248,25 @@ void check_fflush_all(void) {
if (errno) {}// no-warning
}
}
+
+void check_opendir(const char *Path) {
+ DIR *Dir = opendir(Path);
+ if (Dir == NULL) {
+clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
+if (er
https://github.com/benshi001 updated
https://github.com/llvm/llvm-project/pull/78079
>From fd350eea466db33324f07e59469775e81479b33d Mon Sep 17 00:00:00 2001
From: Ben Shi
Date: Sun, 14 Jan 2024 12:44:45 +0800
Subject: [PATCH 1/2] [clang][analyzer] Improve modeling of two functions in
StdLibrar
@@ -248,3 +248,25 @@ void check_fflush_all(void) {
if (errno) {}// no-warning
}
}
+
+void check_opendir(const char *Path) {
+ DIR *Dir = opendir(Path);
+ if (Dir == NULL) {
+clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}}
+if (er
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/benshi001 edited
https://github.com/llvm/llvm-project/pull/78079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
10 matches
Mail list logo