https://bugs.llvm.org/show_bug.cgi?id=51928

            Bug ID: 51928
           Summary: Thread safety analysis: False positive of on
                    exclusive_trylock_function in boolean expression
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: dcough...@apple.com
          Reporter: dino.radakov...@gmail.com
                CC: dcough...@apple.com, llvm-bugs@lists.llvm.org

Example: https://godbolt.org/z/q45aMxMnE

Using an `exclusive_trylock_function` in a boolean expression causes
-Wthread-safety-analysis to warn that the lock "is not held on every path
through here".

This seems like either a false positive or false negative.
I thought it was the former, as I found it in an expression similar to
`m.TryLock() || Exit()`, where `Exit()` is a noreturn function that calls
`exit()`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to