forked from OSchip/llvm-project
Don't print 'NULL TYPE' when dumping a delegating constructor.
llvm-svn: 217707
This commit is contained in:
parent
ec4f873d34
commit
40bcd9f664
clang
|
@ -709,8 +709,12 @@ void ASTDumper::dumpCXXCtorInitializer(const CXXCtorInitializer *Init) {
|
|||
if (Init->isAnyMemberInitializer()) {
|
||||
OS << ' ';
|
||||
dumpBareDeclRef(Init->getAnyMember());
|
||||
} else {
|
||||
} else if (Init->isBaseInitializer()) {
|
||||
dumpType(QualType(Init->getBaseClass(), 0));
|
||||
} else if (Init->isDelegatingInitializer()) {
|
||||
dumpType(Init->getTypeSourceInfo()->getType());
|
||||
} else {
|
||||
llvm_unreachable("Unknown initializer type");
|
||||
}
|
||||
dumpStmt(Init->getInit());
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ namespace testCXXConstructorDecl {
|
|||
class TestCXXConstructorDecl : public A {
|
||||
int I;
|
||||
TestCXXConstructorDecl(A &a, int i) : A(a), I(i) { }
|
||||
TestCXXConstructorDecl(A &a) : TestCXXConstructorDecl(a, 0) { }
|
||||
};
|
||||
}
|
||||
// CHECK: CXXConstructorDecl{{.*}} TestCXXConstructorDecl 'void {{.*}}'
|
||||
|
@ -126,6 +127,10 @@ namespace testCXXConstructorDecl {
|
|||
// CHECK: CXXCtorInitializer{{.*}}I
|
||||
// CHECK-NEXT: Expr
|
||||
// CHECK: CompoundStmt
|
||||
// CHECK: CXXConstructorDecl{{.*}} TestCXXConstructorDecl 'void {{.*}}'
|
||||
// CHECK-NEXT: ParmVarDecl{{.*}} a
|
||||
// CHECK-NEXT: CXXCtorInitializer{{.*}}TestCXXConstructorDecl
|
||||
// CHECK-NEXT: CXXConstructExpr{{.*}}TestCXXConstructorDecl
|
||||
|
||||
class TestCXXDestructorDecl {
|
||||
~TestCXXDestructorDecl() { }
|
||||
|
|
Loading…
Reference in New Issue