aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2012-09-07 17:34:53 +0000
committerDeLesley Hutchins <delesley@google.com>2012-09-07 17:34:53 +0000
commit0b4db3e08a201c35f0011489bd5cd5d39bbe54fb (patch)
tree802adac80c460bdcda595a7a1cb4b48f41d584fe /lib/Sema
parent99d68e9b4cc4a6bdb526722469d3f7412abd82be (diff)
Thread-safety analysis: Add support for selectively turning off warnings
within part of a particular method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 50d1117599..8ffffab8b5 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -415,8 +415,10 @@ static void checkAttrArgsAreLockableObjs(Sema &S, Decl *D,
}
if (StringLiteral *StrLit = dyn_cast<StringLiteral>(ArgExp)) {
- if (StrLit->getLength() == 0) {
+ if (StrLit->getLength() == 0 ||
+ StrLit->getString() == StringRef("*")) {
// Pass empty strings to the analyzer without warnings.
+ // Treat "*" as the universal lock.
Args.push_back(ArgExp);
continue;
}