summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/odr_hash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/odr_hash.cpp')
-rw-r--r--clang/test/Modules/odr_hash.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp
index dd3952232bf..9cb177fbfce 100644
--- a/clang/test/Modules/odr_hash.cpp
+++ b/clang/test/Modules/odr_hash.cpp
@@ -3617,6 +3617,20 @@ int I10 = F10();
#endif
// expected-error@second.h:* {{'FunctionDecl::F10' has different definitions in different modules; definition in module 'SecondModule' first difference is function body}}
// expected-note@first.h:* {{but in 'FirstModule' found a different body}}
+
+#if defined(FIRST)
+struct S11 {
+ template <int> void foo();
+};
+#elif defined(SECOND)
+struct S11 {
+ template <int> void foo();
+};
+template <int> void S11::foo() {}
+#else
+S11 s11;
+#endif
+
} // namespace FunctionDecl
namespace DeclTemplateArguments {
OpenPOWER on IntegriCloud