]> granicus.if.org Git - clang/commitdiff
Module debugging: Add testcase for member classes of class template specializations.
authorAdrian Prantl <aprantl@apple.com>
Tue, 26 Apr 2016 21:58:23 +0000 (21:58 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 26 Apr 2016 21:58:23 +0000 (21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267612 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/ExtDebugInfo.cpp
test/Modules/Inputs/DebugCXX.h

index e16d5a85f28a1fdbf6c81161e0bef7bbf18617f4..4760737bc4ff25cf91ed5190adc00888f30fffe9 100644 (file)
@@ -55,6 +55,9 @@ InAnonymousNamespace anon;
 struct PureFwdDecl { int i; };
 PureFwdDecl definedLocally;
 
+struct Specialized<int>::Member { int i; };
+struct Specialized<int>::Member definedLocally2;
+
 void foo() {
   anon.i = GlobalStruct.i = GlobalUnion.i = GlobalEnum;
 }
@@ -137,11 +140,16 @@ void foo() {
 // CHECK-SAME:             templateParams:
 // CHECK-SAME:             identifier: "_ZTS15FwdDeclTemplateIiE")
 
-// This type is defined locally and forward-declare in the module.
+// This type is defined locally and forward-declared in the module.
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PureFwdDecl",
 // CHECK-SAME:             elements:
 // CHECK-SAME:             identifier: "_ZTS11PureFwdDecl")
 
+// 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: "_ZTSN11SpecializedIiE6MemberE")
+
 // CHECK: !DIGlobalVariable(name: "anon_enum", {{.*}}, type: ![[ANON_ENUM:[0-9]+]]
 // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, scope: ![[NS]],
 // CHECK-SAME:             line: 16
index e6c38435abe69021d8c6d49e1a6e006a27f7983d..9ae74dc688fcfaea8cb23e2cc5ccfb9c7f6aea77 100644 (file)
@@ -95,3 +95,12 @@ extern template class Template1<int>;
 
 template <class T> class FwdDeclTemplate;
 typedef FwdDeclTemplate<int> TypedefFwdDeclTemplate;
+
+// Member classes of class template specializations.
+template <typename T> struct Specialized {
+};
+
+template <> struct Specialized<int> { 
+struct Member;// { int i; };
+};
+