[cfe-commits] r80847 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Sep 2 16:11:48 PDT 2009
Author: fjahanian
Date: Wed Sep 2 18:11:48 2009
New Revision: 80847
URL: http://llvm.org/viewvc/llvm-project?rev=80847&view=rev
Log:
Minor refactoring of my last patch.
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=80847&r1=80846&r2=80847&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Sep 2 18:11:48 2009
@@ -1015,12 +1015,12 @@
continue;
FieldDecl *Field = Member->getMember();
QualType FT = Context.getBaseElementType(Field->getType());
- if (const RecordType* RT = FT->getAs<RecordType>()) {
- CXXConstructorDecl *Ctor =
- cast<CXXRecordDecl>(RT->getDecl())->getDefaultConstructor(Context);
- if (Ctor && !FT->isDependentType())
+ if (FT->isDependentType())
+ continue;
+ if (const RecordType* RT = FT->getAs<RecordType>())
+ if (CXXConstructorDecl *Ctor =
+ cast<CXXRecordDecl>(RT->getDecl())->getDefaultConstructor(Context))
MarkDeclarationReferenced(Ctor->getLocation(), Ctor);
- }
}
if (Diags.getDiagnosticLevel(diag::warn_base_initialized) ==
Diagnostic::Ignored &&
More information about the cfe-commits
mailing list