[clang] [WIP] [analyzer] Refactor MallocChecker to use `BindExpr` in `evalCall` (PR #106081)

Pavel Skripkin via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 28 01:37:31 PDT 2024


================
@@ -67,19 +67,6 @@ void testGlobalNoThrowPlacementExprNewBeforeOverload() {
   int *p = new(std::nothrow) int;
 } // leak-warning{{Potential leak of memory pointed to by 'p'}}
 
-//----- Standard pointer placement operators
-void testGlobalPointerPlacementNew() {
----------------
pskrgag wrote:

Sure! This tests checks that CSA looks into `new` implementation and sees that it just returns some constant pointer. Since PR changes this behavior, test no longer works and CSA reports memory leaks

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


More information about the cfe-commits mailing list