[PATCH] D84603: Thread safety analysis: More consistent warning message
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 10:56:53 PDT 2020
aaron.ballman added inline comments.
================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1644
if (!LDat) {
- Analyzer->Handler.handleMutexNotHeld("", D, POK, Cp.toString(),
- LK_Shared, Loc);
+ Analyzer->Handler.handleMutexNotHeld("negative capability", D, POK,
+ Cp.toString(), LK_Shared, Loc);
----------------
It's a bit odd that we aren't using `DiagKind` as below, I assume that's because this is a negative test and the others are positive tests, but doesn't this introduce a terminology difference where a positive failure may call it a mutex and a negative failure may call it a negative capability? Should this be hooked in to `ClassifyDiagnostic()` (perhaps we need a `ClassifyNegativeDiagnostic()`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84603/new/
https://reviews.llvm.org/D84603
More information about the cfe-commits
mailing list