aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/warn-explicit-specialization-storage-class.cpp
blob: 5d9ace292dc06ca98f7ed84f1898f668e1ee0beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s
// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -Wno-explicit-specialization-storage-class -verify=expnone %s

// expnone-no-diagnostics

struct A {
    template<typename T>
    static constexpr int x = 0;

    template<>
    static constexpr int x<void> = 1; // expected-warning{{explicit specialization cannot have a storage class}}
};

template<typename T>
static constexpr int x = 0;

template<>
static constexpr int x<void> = 1; // expected-warning{{explicit specialization cannot have a storage class}}