Debian Codegraph @

clang/test/SemaCXX/warn-explicit-specialization-storage-class.cpp

raw
1 // RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -Wno-explicit-specialization-storage-class -verify=expnone %s
3
4 // expnone-no-diagnostics
5
6 struct A {
7 template<typename T>
8 static constexpr int x = 0;
9
10 template<>
11 static constexpr int x<void> = 1; // expected-warning{{explicit specialization cannot have a storage class}}
12 };
13
14 template<typename T>
15 static constexpr int x = 0;
16
17 template<>
18 static constexpr int x<void> = 1; // expected-warning{{explicit specialization cannot have a storage class}}