diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-13 18:42:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-13 18:42:29 +0000 |
commit | f6d1d43d68016e975f22264343631a55b9701495 (patch) | |
tree | 8134cf05aa51a7c95f4f0530fa6773aa6dc62744 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 49b96d1a382ae9f31456166f1a734d3f7f30b992 (diff) |
Expand the unused warnings for functions. Warn for:
-static function declarations
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index fd630f2ef3..a48f1e06b8 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1204,6 +1204,8 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D, PrincipalDecl->isInIdentifierNamespace(Decl::IDNS_Ordinary)) PrincipalDecl->setNonMemberOperator(); + SemaRef.MarkUnusedFileScopedDecl(Function); + return Function; } @@ -1415,6 +1417,8 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D, else Owner->addDecl(DeclToAdd); } + + SemaRef.MarkUnusedFileScopedDecl(Method); return Method; } |