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 | 34ecff269e685141ffb729047d36e87d4140a83b (patch) | |
| tree | d02addb447d4851d8a21dff46b7864cf808f18b8 | |
| parent | d0214f3efe5c043b94207bdcf8b6f0bbb7a8f11b (diff) | |
| download | bcm5719-llvm-34ecff269e685141ffb729047d36e87d4140a83b.tar.gz bcm5719-llvm-34ecff269e685141ffb729047d36e87d4140a83b.zip | |
perform cheap test first
llvm-svn: 112346
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
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); } |

