[clang] [analyzer] Report violations of the "returns_nonnull" attribute (PR #106048)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 26 11:33:29 PDT 2024


================
@@ -51,3 +54,15 @@ int *cannot_return_null() {
 __attribute__((returns_nonnull)) int *passthrough(int *p) {
   return p; // no-warning: we have no evidence that `p` is null, i.e., violating the contract
 }
+
+__attribute__((noreturn))
+void exit(int);
----------------
NagyDonat wrote:

Is this declaration used somehow?

https://github.com/llvm/llvm-project/pull/106048


More information about the cfe-commits mailing list