[cfe-commits] r131066 - /cfe/trunk/lib/Sema/SemaExprCXX.cpp
Francois Pichet
pichet2000 at gmail.com
Sun May 8 03:02:20 PDT 2011
Author: fpichet
Date: Sun May 8 05:02:20 2011
New Revision: 131066
URL: http://llvm.org/viewvc/llvm-project?rev=131066&view=rev
Log:
Look at all the record redeclaration when looking for a uuid attribute.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=131066&r1=131065&r2=131066&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May 8 05:02:20 2011
@@ -385,13 +385,14 @@
else if (QT->isArrayType())
Ty = cast<ArrayType>(QT)->getElementType().getTypePtr();
- // Loop all class definition and declaration looking for an uuid attribute.
+ // Loop all record redeclaration looking for an uuid attribute.
CXXRecordDecl *RD = Ty->getAsCXXRecordDecl();
- while (RD) {
- if (UuidAttr *Uuid = RD->getAttr<UuidAttr>())
+ for (CXXRecordDecl::redecl_iterator I = RD->redecls_begin(),
+ E = RD->redecls_end(); I != E; ++I) {
+ if (UuidAttr *Uuid = I->getAttr<UuidAttr>())
return Uuid;
- RD = RD->getPreviousDeclaration();
}
+
return 0;
}
More information about the cfe-commits
mailing list