summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2010-02-17 04:48:01 +0000
committerTanya Lattner <tonic@nondot.org>2010-02-17 04:48:01 +0000
commit339c89bce2c1d540b59c1d9df974b26cc21af4c5 (patch)
tree6790f78349425387dbee083b5167735091bc5cfc /clang/lib/Sema/SemaDecl.cpp
parent67cea74745f6b7767fc6681eac58d152c383b6c2 (diff)
downloadbcm5719-llvm-339c89bce2c1d540b59c1d9df974b26cc21af4c5.tar.gz
bcm5719-llvm-339c89bce2c1d540b59c1d9df974b26cc21af4c5.zip
Do not add functions marked with the unused attribute to the list of unused functions to warn about. Update test case.
llvm-svn: 96452
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 1fc08ce0319..38211134393 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -3135,7 +3135,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
// FIXME: Also include static functions declared but not defined.
if (!NewFD->isInvalidDecl() && IsFunctionDefinition
&& !NewFD->isInlined() && NewFD->getLinkage() == InternalLinkage
- && !NewFD->isUsed())
+ && !NewFD->isUsed() && !NewFD->hasAttr<UnusedAttr>())
UnusedStaticFuncs.push_back(NewFD);
return NewFD;
OpenPOWER on IntegriCloud