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
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 50d1117..8ffffab 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -415,8 +415,10 @@
}
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;
}