perform cheap test first

llvm-svn: 112346
This commit is contained in:
Gabor Greif 2010-08-28 01:58:12 +00:00
parent d0214f3efe
commit 34ecff269e
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}