r190241 - 'return' before 'else' is bad style
David Majnemer
david.majnemer at gmail.com
Sat Sep 7 00:11:04 PDT 2013
Author: majnemer
Date: Sat Sep 7 02:11:04 2013
New Revision: 190241
URL: http://llvm.org/viewvc/llvm-project?rev=190241&view=rev
Log:
'return' before 'else' is bad style
Modified:
cfe/trunk/lib/AST/ExprCXX.cpp
Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=190241&r1=190240&r2=190241&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Sat Sep 7 02:11:04 2013
@@ -67,6 +67,7 @@ UuidAttr *CXXUuidofExpr::GetUuidAttrOfTy
if (!RD)
return 0;
+ // __uuidof can grab UUIDs from template arguments.
if (ClassTemplateSpecializationDecl *CTSD =
dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
const TemplateArgumentList &TAL = CTSD->getTemplateArgs();
@@ -103,12 +104,13 @@ UuidAttr *CXXUuidofExpr::GetUuidAttrOfTy
}
return UuidForRD;
- } else
- for (CXXRecordDecl::redecl_iterator I = RD->redecls_begin(),
- E = RD->redecls_end();
- I != E; ++I)
- if (UuidAttr *Uuid = I->getAttr<UuidAttr>())
- return Uuid;
+ }
+
+ for (CXXRecordDecl::redecl_iterator I = RD->redecls_begin(),
+ E = RD->redecls_end();
+ I != E; ++I)
+ if (UuidAttr *Uuid = I->getAttr<UuidAttr>())
+ return Uuid;
return 0;
}
More information about the cfe-commits
mailing list