Skip to content

Commit 8ed3213

Browse files
committed
[FOLD]
1 parent 351d16f commit 8ed3213

File tree

1 file changed

+30
-0
lines changed
  • clang/test/CXX/temp/temp.spec/temp.expl.spec

1 file changed

+30
-0
lines changed

clang/test/CXX/temp/temp.spec/temp.expl.spec/p2-20.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
22

3+
template<typename T>
4+
int x;
5+
6+
template<typename T>
7+
static int x<T*>;
8+
9+
template<>
10+
static int x<int>; // expected-warning {{explicit specialization cannot have a storage class}}
11+
12+
template<typename T>
13+
extern int y;
14+
15+
template<typename T>
16+
static int y<T*>;
17+
18+
template<>
19+
static int y<int>; // expected-warning {{explicit specialization cannot have a storage class}}
20+
21+
template<typename T>
22+
void f();
23+
24+
template<>
25+
static void f<int>(); // expected-warning {{explicit specialization cannot have a storage class}}
26+
27+
template<typename T>
28+
extern void g();
29+
30+
template<>
31+
static void g<int>(); // expected-warning {{explicit specialization cannot have a storage class}}
32+
333
struct A {
434
static int x;
535

0 commit comments

Comments
 (0)