[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-19 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked an inline comment as done. aaronpuchert added a comment. In https://reviews.llvm.org/D51901#1239759, @delesley wrote: > This looks okay to me, but I have not tested it on a large code base to see > if it breaks anything. On our code base (not as large as Google's) there was

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-19 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC342605: Thread Safety Analysis: warnings for attributes without arguments (authored by aaronpuchert, committed by ). Changed prior to commit: https://reviews.llvm.org/D51901?vs=165004&id=166205#toc Rep

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-19 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley accepted this revision. delesley added a comment. This revision is now accepted and ready to land. This looks okay to me, but I have not tested it on a large code base to see if it breaks anything. Comment at: lib/Sema/SemaDeclAttr.cpp:589 +<< AL << MD->ge

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-11 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked an inline comment as done. aaronpuchert added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3016-3017 +def warn_thread_attribute_not_on_capability_member : Warning< + "%0 attribute without capability arguments can only be applied in

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-11 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 165004. aaronpuchert added a comment. Improved handling of type-dependent base classes and slightly reworded warning message. Repository: rC Clang https://reviews.llvm.org/D51901 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDe

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Josh Gao via Phabricator via cfe-commits
jmgao added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3016-3017 +def warn_thread_attribute_not_on_capability_member : Warning< + "%0 attribute without capability arguments can only be applied in a class " + "annotated with 'capability' or 'scoped_l

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. The second warning message is a bit long, so if any of you have a better idea I'd welcome it. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3016-3017 +def warn_thread_attribute_not_on_capability_member : Warning< + "%0 attribute without

[PATCH] D51901: Thread Safety Analysis: warnings for attributes without arguments

2018-09-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley, jmgao. Herald added a subscriber: cfe-commits. When thread safety annotations are used without capability arguments, they are assumed to apply to `this` instead. So we warn when either `this` doesn't exist,