summaryrefslogtreecommitdiffstats
path: root/tests/cxx/macro_location_tpl-d2.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cxx/macro_location_tpl-d2.h')
-rw-r--r--tests/cxx/macro_location_tpl-d2.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/cxx/macro_location_tpl-d2.h b/tests/cxx/macro_location_tpl-d2.h
new file mode 100644
index 0000000..33da0bb
--- /dev/null
+++ b/tests/cxx/macro_location_tpl-d2.h
@@ -0,0 +1,33 @@
+//===--- macro_location_tpl-d2.h - test input file for iwyu ---------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// Declare a couple of function templates whose specializations are used in a
+// macro, to check that author intent hints attribute uses to the right place.
+template <typename>
+void expansion_template() = delete;
+template <>
+void expansion_template<int>();
+
+template <typename>
+void spelling_template() = delete;
+template <>
+void spelling_template<int>();
+
+// As above, but for class templates.
+template <typename>
+struct ExpansionTemplate {
+ void method() {
+ }
+};
+
+template <typename>
+struct SpellingTemplate {
+ void method() {
+ }
+};