diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-08-28 01:58:12 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-08-28 01:58:12 +0000 |
commit | be9ebe3747716a916d8b69a7e7a5276919136c87 (patch) | |
tree | 87f1c06b6fb5a87e266e25131d7b37fecf673f3d | |
parent | 944c42feb4f40735f3767bae59a0547a7b803e1e (diff) |
perform cheap test first
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112346 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index c699623882..d0c2b8214a 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/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); } |