This revision was automatically updated to reflect the committed changes.
Closed by commit rG24485aec4750: [clang analysis] Make mutex guard detection
more reliable. (authored by efriedma).
Changed prior to commit:
https://reviews.llvm.org/D76943?vs=253253=253657#toc
Repository:
rG LLVM
aaronpuchert added inline comments.
Comment at: clang/test/SemaCXX/warn-thread-safety-analysis.cpp:5659
+ }
+ struct Convertible { Convertible(); operator ReadLockedPtr(); };
+ void use_conversion() {
Honestly I'd prefer the annotation to be on this operator
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76943/new/
https://reviews.llvm.org/D76943
___
cfe-commits mailing list
efriedma updated this revision to Diff 253253.
efriedma added a comment.
Add support for conversion operators.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76943/new/
https://reviews.llvm.org/D76943
Files:
clang/lib/Analysis/ThreadSafety.cpp
aaronpuchert added subscribers: aaron.ballman, aaronpuchert.
aaronpuchert added inline comments.
Comment at: clang/lib/Analysis/ThreadSafety.cpp:2144-2145
+ if (auto *CE = dyn_cast(E))
+if (CE->getCastKind() == CK_NoOp ||
+CE->getCastKind() ==
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Analysis/ThreadSafety.cpp:2144-2145
+ if (auto *CE = dyn_cast(E))
+if (CE->getCastKind() == CK_NoOp ||
+CE->getCastKind()
efriedma created this revision.
efriedma added a reviewer: rsmith.
Herald added a project: clang.
-Wthread-safety was failing to detect certain AST patterns it should detect.
Make the pattern detection a bit more comprehensive.
Due to an unrelated bug involving template instantiation, this