[clang] [clang][analyzer] Model allocation behavior or getdelim/geline (PR #83138)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 03:56:26 PST 2024


Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/83138 at github.com>


================
@@ -1423,6 +1435,46 @@ void MallocChecker::checkGMallocN0(const CallEvent &Call,
   C.addTransition(State);
 }
 
+void MallocChecker::preGetdelim(const CallEvent &Call,
+                                CheckerContext &C) const {
+  if (!Call.isGlobalCFunction())
+    return;
----------------
NagyDonat wrote:

I'm in the middle of refactoring `CallDescription::matches()` and after that there will be a cleaner alternative instead of this kind of late check. (No action needed from you, I'll update this code along with all the other checkers.)

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


More information about the cfe-commits mailing list