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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 13 07:20:04 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);
----------------
Xazax-hun wrote:

Nit: you could move this closer to it's usage.

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


More information about the cfe-commits mailing list