Skip to content

Commit 23d850d

Browse files
committed
print more information
1 parent 1119ecf commit 23d850d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

clang/lib/AST/TextNodeDumper.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,14 @@ void TextNodeDumper::Visit(const APValue &Value, QualType Ty) {
739739
OS << BE->getStmtClassName() << ' ';
740740
dumpPointer(BE);
741741
} else if (B.is<TypeInfoLValue>()) {
742-
OS << "TypeInfoLValue";
742+
OS << "TypeInfoLValue ";
743+
const auto BTI = B.get<TypeInfoLValue>();
744+
ColorScope Color(OS, ShowColors, TypeColor);
745+
BTI.print(OS,PrintPolicy);
743746
} else if (B.is<DynamicAllocLValue>()) {
744747
OS << "DynamicAllocLValue";
748+
auto BDA = B.getDynamicAllocType();
749+
dumpType(BDA);
745750
} else {
746751
const auto *VDB = B.get<const ValueDecl *>();
747752
OS << VDB->getDeclKindName() << "Decl";

clang/test/AST/ast-dump-APValue-lvalue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ void Test(int (&arr)[10]) {
5454

5555
constexpr const std::type_info* pti = &typeid(int);
5656
// CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} pti 'const std::type_info *const' constexpr cinit
57-
// CHECK-NEXT: |-value: LValue Base=TypeInfoLValue, Null=0, Offset=0, HasPath=1, PathLength=0, Path=()
57+
// CHECK-NEXT: |-value: LValue Base=TypeInfoLValue typeid(int), Null=0, Offset=0, HasPath=1, PathLength=0, Path=()
5858
}

0 commit comments

Comments
 (0)