int A = 0;
int B = 1;
};
+
+ enum class NestedEnum {
+ EnumValue1 = 0,
+ EnumValue2 = 1,
+ };
int C = 2;
int D = 3;
using VoidPtrT = void *;
constexpr U<int> GlobalF;
constexpr U<int>::V<int> GlobalG;
constexpr U<int>::W GlobalH;
+constexpr S::NestedEnum GlobalEnum = S::NestedEnum::EnumValue1;
int main(int argc, char **argv) {
// CHECK: (int) I = 8
// CHECK: (int) J = 9
// CHECK: }
+// CHECK: (lldb) target variable -T GlobalEnum
+// CHECK: (const S::NestedEnum) GlobalEnum = EnumValue1
// CHECK: (lldb) target modules dump ast
// CHECK: Dumping clang ast for 1 modules.
// CHECK: TranslationUnitDecl {{.*}}
// CHECK: | |-FieldDecl {{.*}} C 'int'
// CHECK: | |-FieldDecl {{.*}} D 'int'
// CHECK: | |-FieldDecl {{.*}} DD 'void *'
-// CHECK: | `-CXXRecordDecl {{.*}} struct NestedStruct definition
-// CHECK: | |-FieldDecl {{.*}} A 'int'
-// CHECK: | `-FieldDecl {{.*}} B 'int'
+// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition
+// CHECK: | | |-FieldDecl {{.*}} A 'int'
+// CHECK: | | `-FieldDecl {{.*}} B 'int'
+// CHECK: | `-EnumDecl {{.*}} NestedEnum\r
+// CHECK: | |-EnumConstantDecl {{.*}} EnumValue1 'S::NestedEnum'\r
+// CHECK: | `-EnumConstantDecl {{.*}} EnumValue2 'S::NestedEnum'
// CHECK: |-CXXRecordDecl {{.*}} struct T definition
// CHECK: | |-FieldDecl {{.*}} NT 'int'
// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition
// inner tag type is not necessarily the same as the outer tag type, re-write
// it to match the inner tag type.
qname[3] = child.asTag().getUniqueName()[3];
- std::string piece = Record.Name;
+ std::string piece;
+ if (qname[3] == 'W')
+ piece = "4";
+ piece += Record.Name;
piece.push_back('@');
qname.insert(4, std::move(piece));
if (qname != child.asTag().UniqueName)