aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaAttr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r--lib/Sema/SemaAttr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp
index a67c4fbbb2..c983199cf9 100644
--- a/lib/Sema/SemaAttr.cpp
+++ b/lib/Sema/SemaAttr.cpp
@@ -277,8 +277,8 @@ void Sema::ActOnPragmaUnused(const Token &IdTok, Scope *curScope,
}
VarDecl *VD = Lookup.getAsSingle<VarDecl>();
- if (!VD || !(VD->hasLocalStorage() || VD->isStaticLocal())) {
- Diag(PragmaLoc, diag::warn_pragma_unused_expected_localvar)
+ if (!VD) {
+ Diag(PragmaLoc, diag::warn_pragma_unused_expected_var_arg)
<< Name << SourceRange(IdTok.getLocation());
return;
}