[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 03:05:55 PDT 2024
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Donát?= Nagy <donat.nagy at ericsson.com>,NagyDonat
<donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/85791 at github.com>
================
@@ -1435,9 +1440,17 @@ void MallocChecker::checkGMallocN0(const CallEvent &Call,
C.addTransition(State);
}
+static bool isFromStdNamespace(const CallEvent &Call) {
+ const Decl *FD = Call.getDecl();
+ assert(FD && "a CallDescription cannot match a call without a Decl");
+ return (FD->isInStdNamespace());
----------------
NagyDonat wrote:
```suggestion
return FD->isInStdNamespace();
```
https://github.com/llvm/llvm-project/pull/85791
More information about the llvm-commits
mailing list