summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-08-28 01:58:12 +0000
committerGabor Greif <ggreif@gmail.com>2010-08-28 01:58:12 +0000
commit34ecff269e685141ffb729047d36e87d4140a83b (patch)
treed02addb447d4851d8a21dff46b7864cf808f18b8 /clang/lib
parentd0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b (diff)
downloadbcm5719-llvm-34ecff269e685141ffb729047d36e87d4140a83b.tar.gz
bcm5719-llvm-34ecff269e685141ffb729047d36e87d4140a83b.zip
perform cheap test first
llvm-svn: 112346
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index c699623882f..d0c2b8214a9 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -7712,7 +7712,7 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) {
} else // Walk redefinitions, as some of them may be instantiable.
for (FunctionDecl::redecl_iterator i(Function->redecls_begin()),
e(Function->redecls_end()); i != e; ++i) {
- if (i->isImplicitlyInstantiable())
+ if (!i->isUsed(false) && i->isImplicitlyInstantiable())
MarkDeclarationReferenced(Loc, *i);
}
OpenPOWER on IntegriCloud