summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-08-28 15:42:30 +0000
committerGabor Greif <ggreif@gmail.com>2010-08-28 15:42:30 +0000
commit122f1eb2b8a446c8251f24a5343e082fd49f4cb7 (patch)
tree9a63d932011673c9a6bb36c0963a6d11070e9f4d /clang/lib
parent4a9da315d3be442a4aaed258e1ec3aaae8edc936 (diff)
downloadbcm5719-llvm-122f1eb2b8a446c8251f24a5343e082fd49f4cb7.tar.gz
bcm5719-llvm-122f1eb2b8a446c8251f24a5343e082fd49f4cb7.zip
simplify
llvm-svn: 112372
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index e40075a45f0..e9d642f6791 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/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)) {
OpenPOWER on IntegriCloud