r267612 - Module debugging: Add testcase for member classes of class template specializations.

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 14:58:23 PDT 2016


Author: adrian
Date: Tue Apr 26 16:58:23 2016
New Revision: 267612

URL: http://llvm.org/viewvc/llvm-project?rev=267612&view=rev
Log:
Module debugging: Add testcase for member classes of class template specializations.

Modified:
    cfe/trunk/test/Modules/ExtDebugInfo.cpp
    cfe/trunk/test/Modules/Inputs/DebugCXX.h

Modified: cfe/trunk/test/Modules/ExtDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/ExtDebugInfo.cpp?rev=267612&r1=267611&r2=267612&view=diff
==============================================================================
--- cfe/trunk/test/Modules/ExtDebugInfo.cpp (original)
+++ cfe/trunk/test/Modules/ExtDebugInfo.cpp Tue Apr 26 16:58:23 2016
@@ -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

Modified: cfe/trunk/test/Modules/Inputs/DebugCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/DebugCXX.h?rev=267612&r1=267611&r2=267612&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Inputs/DebugCXX.h (original)
+++ cfe/trunk/test/Modules/Inputs/DebugCXX.h Tue Apr 26 16:58:23 2016
@@ -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; };
+};
+




More information about the cfe-commits mailing list