summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/debug-info-template.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-template.cpp b/clang/test/CodeGenCXX/debug-info-template.cpp
index 7b987ef97c1..1d2dc10cf25 100644
--- a/clang/test/CodeGenCXX/debug-info-template.cpp
+++ b/clang/test/CodeGenCXX/debug-info-template.cpp
@@ -1,5 +1,12 @@
// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++11 | FileCheck %s
+// CHECK: [[EMPTY:![0-9]*]] = metadata !{i32 0}
+
+// func<...> doesn't have any template arguments listed since we don't support
+// packs yet. This could be encoded with GNU's
+// DW_TAG_GNU_template_parameter_pack extension.
+// CHECK: {{.*}}, metadata [[EMPTY]], i32 {{[0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [func<int>]
+
// CHECK: [[INT:![0-9]*]] = {{.*}} ; [ DW_TAG_base_type ] [int]
// CHECK: metadata [[TCI:![0-9]*]], i32 0, i32 1, %class.TC* @tci, null} ; [ DW_TAG_variable ] [tci]
// CHECK: [[TC:![0-9]*]] = {{.*}}, metadata [[TCARGS:![0-9]*]]} ; [ DW_TAG_class_type ] [TC<unsigned int, 2, &glb, &foo::e, &foo::f>]
@@ -67,3 +74,6 @@ int glb;
TC<unsigned, 2, &glb, &foo::e, &foo::f> tci;
TC<int, -3, nullptr, nullptr, nullptr> tcn;
+
+template<typename ...Ts> int func() { return 0; }
+int anchor = func<int>();
OpenPOWER on IntegriCloud