summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-04-26 21:58:23 +0000
committerAdrian Prantl <aprantl@apple.com>2016-04-26 21:58:23 +0000
commit90931c4853e4cf07d8aab14f287c0c178797dd72 (patch)
treedbde87b8d8ef4247a1ee155de8de22c79897a589 /clang/test/Modules
parent88d7917970e98609943d68dc1c47712104dfcb92 (diff)
downloadbcm5719-llvm-90931c4853e4cf07d8aab14f287c0c178797dd72.tar.gz
bcm5719-llvm-90931c4853e4cf07d8aab14f287c0c178797dd72.zip
Module debugging: Add testcase for member classes of class template specializations.
llvm-svn: 267612
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/ExtDebugInfo.cpp10
-rw-r--r--clang/test/Modules/Inputs/DebugCXX.h9
2 files changed, 18 insertions, 1 deletions
diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp
index e16d5a85f28..4760737bc4f 100644
--- a/clang/test/Modules/ExtDebugInfo.cpp
+++ b/clang/test/Modules/ExtDebugInfo.cpp
@@ -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
diff --git a/clang/test/Modules/Inputs/DebugCXX.h b/clang/test/Modules/Inputs/DebugCXX.h
index e6c38435abe..9ae74dc688f 100644
--- a/clang/test/Modules/Inputs/DebugCXX.h
+++ b/clang/test/Modules/Inputs/DebugCXX.h
@@ -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; };
+};
+
OpenPOWER on IntegriCloud