aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/namespace-attributes.cpp
blob: 11bf8711cfad5d4dfeec8a87b6564fd40b383668 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// RUN: %clang_cc1 -std=c++17 -verify %s

namespace __attribute__(()) A
{
}

namespace A __attribute__(()) [[]] // expected-error {{an attribute list cannot appear here}}
{
}

namespace A [[]] __attribute__(()) // expected-error {{an attribute list cannot appear here}}
{
}

namespace [[]] A __attribute__(())
{
}

namespace [[]] __attribute__(()) A
{
}

namespace __attribute__(()) [[]] A
{
}

namespace __attribute__(()) A [[]] // expected-error {{an attribute list cannot appear here}}
{
}

namespace A::B __attribute__(()) // expected-error {{attributes cannot be specified on a nested namespace definition}}
{
}

namespace __attribute__(()) A::B // expected-error {{attributes cannot be specified on a nested namespace definition}}
{
}