19 lines · cpp
1// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s2// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -Wno-explicit-specialization-storage-class -verify=expnone %s3 4// expnone-no-diagnostics5 6struct 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 14template<typename T>15static constexpr int x = 0;16 17template<>18static constexpr int x<void> = 1; // expected-warning{{explicit specialization cannot have a storage class}}19