diff options
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 4 |
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; } |