summaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTConsumers.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-10-25 17:03:50 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-10-25 17:03:50 +0000
commit9994a34f6cf842721ba7723edc0b9036229fe387 (patch)
tree3c68a7991a033f95c76d6997feba2c0cffee94a4 /lib/Frontend/ASTConsumers.cpp
parentbbc1cc5757d0ef068bef583ee4eda108dece806c (diff)
downloadclang-9994a34f6cf842721ba7723edc0b9036229fe387.tar.gz
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTConsumers.cpp')
-rw-r--r--lib/Frontend/ASTConsumers.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp
index 446678ab6d..9a30f59465 100644
--- a/lib/Frontend/ASTConsumers.cpp
+++ b/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;