]> granicus.if.org Git - clang/commit
[ThreadSafetyAnalysis] Fix isCapabilityExpr
authorYi Kong <yikong@google.com>
Thu, 14 Dec 2017 22:24:45 +0000 (22:24 +0000)
committerYi Kong <yikong@google.com>
Thu, 14 Dec 2017 22:24:45 +0000 (22:24 +0000)
commitc8c70b6d6ed0b2588a66a3e323a83a3c0013cb3b
treec9035b84cbafcbac944fb8945cec30c5c1746d20
parent8387eb5f328aa8762e787df252a2510435a72bbf
[ThreadSafetyAnalysis] Fix isCapabilityExpr

There are many more expr types that can be a capability expr, like
CXXThisExpr, CallExpr, MemberExpr. Instead of enumerating all of them,
just check typeHasCapability for any type given.

Also add & and * operators to allowed unary operators.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320753 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclAttr.cpp
test/Sema/attr-capabilities.cpp [new file with mode: 0644]
test/SemaCXX/warn-thread-safety-parsing.cpp