Skip to content

Commit 6081efa

Browse files
committed
Change class->typename in test templates
1 parent 074f5e5 commit 6081efa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/test/SemaCXX/unique_object_duplication.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,32 +192,32 @@ template int maybeAllowedTemplate<int*>; // hidden-note {{in instantiation of}}
192192

193193

194194
// Should work the same for static class members
195-
template <class T>
195+
template <typename T>
196196
struct S {
197197
static int staticMember;
198198
};
199199

200-
template <class T>
200+
template <typename T>
201201
int S<T>::staticMember = 0; // Never instantiated
202202

203203
// T* specialization
204-
template <class T>
204+
template <typename T>
205205
struct S<T*> {
206206
static int staticMember;
207207
};
208208

209-
template <class T>
209+
template <typename T>
210210
int S<T*>::staticMember = 1; // hidden-warning {{'staticMember' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
211211

212212
template class S<int*>; // hidden-note {{in instantiation of}}
213213

214214
// T& specialization, implicitly instantiated
215-
template <class T>
215+
template <typename T>
216216
struct S<T&> {
217217
static int staticMember;
218218
};
219219

220-
template <class T>
220+
template <typename T>
221221
int S<T&>::staticMember = 2; // hidden-warning {{'staticMember' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
222222

223223
int implicit_instantiate2() {
@@ -226,7 +226,7 @@ int implicit_instantiate2() {
226226

227227

228228
// Should work for static locals as well
229-
template <class T>
229+
template <typename T>
230230
int* wrapper() {
231231
static int staticLocal; // hidden-warning {{'staticLocal' may be duplicated when built into a shared library: it is mutable, has hidden visibility, and external linkage}}
232232
return &staticLocal;

0 commit comments

Comments
 (0)