]> granicus.if.org Git - clang/commit
Thread Safety Analysis: warn on nonsensical attributes.
authorJosh Gao <jmgao@google.com>
Tue, 8 Aug 2017 19:44:35 +0000 (19:44 +0000)
committerJosh Gao <jmgao@google.com>
Tue, 8 Aug 2017 19:44:35 +0000 (19:44 +0000)
commitecc330a87cf2ef13a61551394cfda1c39188af99
tree6f64ea37b087b503aa22c4471110eee6df790855
parent56427e245e62f2cb664f183fd2159bfb4b0e6373
Thread Safety Analysis: warn on nonsensical attributes.

Add warnings in cases where an implicit `this` argument is expected to
attributes because either `this` doesn't exist because the attribute is
on a free function, or because `this` is on a type that doesn't have a
corresponding capability/lockable/scoped_lockable attribute.

Reviewers: delesley, aaron.ballman

Differential Revision: https://reviews.llvm.org/D36237

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310403 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/Sema/attr-capabilities.c
test/SemaCXX/warn-thread-safety-parsing.cpp