Skip to content

Commit cd6cace

Browse files
committed
[FOLD] use same type for variables in tests
1 parent 14db4ba commit cd6cace

File tree

1 file changed

+5
-6
lines changed
  • clang/test/CXX/temp/temp.decls/temp.mem

1 file changed

+5
-6
lines changed

clang/test/CXX/temp/temp.decls/temp.mem/p1.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
template <class T> struct A {
44
static T cond;
5-
5+
66
template <class U> struct B {
77
static T twice(U value) {
88
return (cond ? value + value : value);
@@ -53,7 +53,7 @@ namespace OutOfLine {
5353
static int x<U*, V>;
5454

5555
template<typename U, B V>
56-
static constexpr int x<U&, V> = 0; // expected-note {{previous definition is here}}
56+
static inline int x<U&, V> = 0; // expected-note {{previous definition is here}}
5757

5858
template<typename U, B V>
5959
struct C;
@@ -83,7 +83,7 @@ namespace OutOfLine {
8383

8484
template<typename T>
8585
template<typename U, typename A<T>::B V>
86-
constexpr int A<T>::x<U&, V> = 0; // expected-error {{redefinition of 'x<U &, V>'}}
86+
int A<T>::x<U&, V> = 0; // expected-error {{redefinition of 'x<U &, V>'}}
8787

8888
template<typename T>
8989
template<typename U, typename A<T>::B V>
@@ -120,12 +120,11 @@ namespace OutOfLine {
120120

121121
template<>
122122
template<typename U, A<int>::B V>
123-
constexpr int A<int>::x<U&, V> = 0;
123+
int A<int>::x<U&, V> = 0; // expected-note {{previous definition is here}}
124124

125-
// FIXME: We should diagnose this redefinition!
126125
template<>
127126
template<typename U, A<int>::B V>
128-
constexpr int A<int>::x<U&, V> = 0;
127+
int A<int>::x<U&, V> = 0; // expected-error {{redefinition of 'x<U &, V>'}}
129128

130129
template<>
131130
template<typename U, A<int>::B V>

0 commit comments

Comments
 (0)