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 | 540bc01f500e353d3233edb799b1b5d868633c48 (patch) | |
tree | 1d84c58136922739a7fe41e2443c10da8e781630 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 35672e78523162ab292962ce5aec3f512ee5cf8a (diff) | |
download | bcm5719-llvm-540bc01f500e353d3233edb799b1b5d868633c48.tar.gz bcm5719-llvm-540bc01f500e353d3233edb799b1b5d868633c48.zip |
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
llvm-svn: 111026
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index fd630f2ef3e..a48f1e06b83 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/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; } |