aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-13 18:42:40 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-13 18:42:40 +0000
commit30c0dd86f0dc3c1a1fba29581d04e8ed0bdb659d (patch)
tree408d41d6a1f30e44706c5c87f51c0531767a653c /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentf6d1d43d68016e975f22264343631a55b9701495 (diff)
The unused warnings extravaganza continues. Warn for:
-static variables -variables in anonymous namespace (fixes rdar://7794535) -static data members in anonymous namespace -static data members specializations in anonymous namespace git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index a48f1e06b8..115eefbe5e 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -449,7 +449,9 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
// Diagnose unused local variables.
if (!Var->isInvalidDecl() && Owner->isFunctionOrMethod() && !Var->isUsed())
SemaRef.DiagnoseUnusedDecl(Var);
-
+
+ SemaRef.MarkUnusedFileScopedDecl(Var);
+
return Var;
}