[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" again (PR #85791)

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 25 02:37:14 PDT 2024


=?utf-8?q?Don=C3=A1t?= Nagy <donat.nagy at ericsson.com>,
=?utf-8?q?Don=C3=A1t?= Nagy <donat.nagy at ericsson.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/85791 at github.com>


================
@@ -446,8 +448,11 @@ class MallocChecker
        std::bind(&MallocChecker::checkRealloc, _1, _2, _3, false)},
       {{{"g_realloc_n"}, 3}, &MallocChecker::checkReallocN},
       {{{"g_try_realloc_n"}, 3}, &MallocChecker::checkReallocN},
-      {{{"getline"}, 3}, &MallocChecker::checkGetdelim},
-      {{{"getdelim"}, 4}, &MallocChecker::checkGetdelim},
+
+      // NOTE: the following CallDescription also matches the C++ standard
+      // library function std::getdelim(); the callback will filter it out.
----------------
NagyDonat wrote:

```suggestion
      // library function std::getline(); the callback will filter it out.
```

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


More information about the cfe-commits mailing list