diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-08-28 15:42:30 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-08-28 15:42:30 +0000 |
commit | 13a8affbb87cdb869adabe2a6e5998559f2598c4 (patch) | |
tree | 86e716cbe9856fe5cd96c03e20b03e7a4552f4a1 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | ae2777cfe7d21f73e5a4155082fe20197cec62bd (diff) |
simplify
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index e40075a45f..e9d642f679 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1183,8 +1183,9 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D, else for (FunctionDecl::redecl_iterator R = Function->redecls_begin(), REnd = Function->redecls_end(); R != REnd; ++R) { - if (*R != Function && - ((*R)->getFriendObjectKind() != Decl::FOK_None)) { + if (*R == Function) + continue; + if ((*R)->getFriendObjectKind() != Decl::FOK_None) { if (const FunctionDecl *RPattern = (*R)->getTemplateInstantiationPattern()) if (RPattern->hasBody(RPattern)) { |