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

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 09:29:56 PST 2025


================
@@ -145,6 +145,92 @@ using MutexDescriptor =
     std::variant<FirstArgMutexDescriptor, MemberMutexDescriptor,
                  RAIIMutexDescriptor>;
 
+class NonBlockOpenVisitor : public BugReporterVisitor {
+private:
+  const VarRegion *VR;
+  const CallExpr *OpenCallExpr;
+  int O_NONBLOCKV;
----------------
whisperity wrote:

These POSIX constants are often defined as preprocessor macros, so I don't think it's a good idea to use these as symbol names where they could expand to their definition.  

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


More information about the cfe-commits mailing list