[cfe-commits] r142807 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Oct 24 10:30:45 PDT 2011
Author: fjahanian
Date: Mon Oct 24 12:30:45 2011
New Revision: 142807
URL: http://llvm.org/viewvc/llvm-project?rev=142807&view=rev
Log:
Minor refactoring of my last patch. Per Doug's suggestion.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=142807&r1=142806&r2=142807&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Oct 24 12:30:45 2011
@@ -1151,7 +1151,7 @@
// Okay, add this new base class.
KnownBaseTypes[NewBaseType] = Bases[idx];
Bases[NumGoodBases++] = Bases[idx];
- if (const RecordType *Record = dyn_cast<RecordType>(NewBaseType))
+ if (const RecordType *Record = NewBaseType->getAs<RecordType>())
if (const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl()))
if (RD->hasAttr<WeakAttr>())
Class->addAttr(::new (Context) WeakAttr(SourceRange(), Context));
More information about the cfe-commits
mailing list