summaryrefslogtreecommitdiff
path: root/clang/test/Modules/redecl-templates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/redecl-templates.cpp')
-rw-r--r--clang/test/Modules/redecl-templates.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/Modules/redecl-templates.cpp b/clang/test/Modules/redecl-templates.cpp
index ee42dc9c6a84..3ebafb53dc3b 100644
--- a/clang/test/Modules/redecl-templates.cpp
+++ b/clang/test/Modules/redecl-templates.cpp
@@ -1,7 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -x c++ -I %S/Inputs/redecl-templates %s -verify -std=c++14
// RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/redecl-templates %s -verify -std=c++14
-// expected-no-diagnostics
template<int N> struct A {};
template<int N> using X = A<N>;
@@ -29,4 +28,7 @@ int &x = w<1>;
// instantiation of this specialization.
template<> struct A<1> {};
template<> constexpr void f<1>() {}
-template<> int v<1>;
+// Variable template explicit specializations are always definitions unless they
+// are static data members declared without an initializer.
+template<> int v<1>; // expected-error {{redefinition of 'v<1>'}}
+ // expected-note@Inputs/redecl-templates/a.h:8 {{previous definition is here}}