diff options
Diffstat (limited to 'clang/test/Modules/ExtDebugInfo.cpp')
-rw-r--r-- | clang/test/Modules/ExtDebugInfo.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp index 4760737bc4f..dbf79f4ff14 100644 --- a/clang/test/Modules/ExtDebugInfo.cpp +++ b/clang/test/Modules/ExtDebugInfo.cpp @@ -28,6 +28,8 @@ using DebugCXX::Struct; Struct s; DebugCXX::Enum e; + +// Template instantiations. DebugCXX::Template<long> implicitTemplate; DebugCXX::Template<int> explicitTemplate; DebugCXX::FloatInstantiation typedefTemplate; @@ -51,13 +53,16 @@ TypedefFwdDeclTemplate tdfdt; InAnonymousNamespace anon; -// Forward-declared in the module. +// Types that are forward-declared in the module and defined here. struct PureFwdDecl { int i; }; PureFwdDecl definedLocally; struct Specialized<int>::Member { int i; }; struct Specialized<int>::Member definedLocally2; +template <class T> struct FwdDeclTemplateMember<T>::Member { T t; }; +TypedefFwdDeclTemplateMember tdfdtm; + void foo() { anon.i = GlobalStruct.i = GlobalUnion.i = GlobalEnum; } @@ -150,6 +155,12 @@ void foo() { // CHECK-SAME: elements: // CHECK-SAME: identifier: "_ZTSN11SpecializedIiE6MemberE") +// This type is defined locally and forward-declared in the module. +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Member", +// CHECK-SAME: elements: +// CHECK-SAME: identifier: "_ZTSN21FwdDeclTemplateMemberIiE6MemberE") + + // CHECK: !DIGlobalVariable(name: "anon_enum", {{.*}}, type: ![[ANON_ENUM:[0-9]+]] // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, scope: ![[NS]], // CHECK-SAME: line: 16 |