[clang] [clang][analyzer] Fix false positive of BlockInCriticalSectionChecker (PR #127049)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 14 05:09:41 PST 2025


================
@@ -306,6 +314,25 @@ void BlockInCriticalSectionChecker::handleUnlock(
   C.addTransition(State);
 }
 
+void BlockInCriticalSectionChecker::handleOpen(const CallEvent &Call,
+                                               CheckerContext &C) const {
+  const auto *Flag = Call.getArgExpr(1);
+  static std::optional<int> ValueOfONonBlockVFlag =
----------------
flovent wrote:

this is done, refer to the implementation of MallocChecker about marco, make it a mutable std::optional field

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


More information about the cfe-commits mailing list