From 1054faed320dd781a31338493d7368b3789c141f Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 25 Oct 2009 17:03:50 +0000 Subject: Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector. llvm-svn: 85055 --- clang/lib/Frontend/ASTConsumers.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/ASTConsumers.cpp') diff --git a/clang/lib/Frontend/ASTConsumers.cpp b/clang/lib/Frontend/ASTConsumers.cpp index 446678ab6d5..9a30f59465f 100644 --- a/clang/lib/Frontend/ASTConsumers.cpp +++ b/clang/lib/Frontend/ASTConsumers.cpp @@ -452,6 +452,8 @@ class RecordLayoutDumper : public ASTConsumer { // Dump (non-virtual) bases for (CXXRecordDecl::base_class_const_iterator I = RD->bases_begin(), E = RD->bases_end(); I != E; ++I) { + assert(!I->getType()->isDependentType() && + "Cannot layout class with dependent bases."); if (I->isVirtual()) continue; -- cgit v1.2.3