blob: 7c8efcb8ec7cb57ae6b10a04eb46c66c3b0df67e [file] [log] [blame]
Michael Han07fc1ba2013-01-07 16:57:11 +00001// RUN: %clang_cc1 -verify -std=c++11 %s
2// RUN: cp %s %t
3// RUN: not %clang_cc1 -x c++ -std=c++11 -fixit %t
4// RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++11 %t
5// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
6
7namespace ClassSpecifier {
8 class [[]] [[]]
9 attr_after_class_name_decl [[]] [[]]; // expected-error {{an attribute list cannot appear here}}
10 // CHECK: fix-it:{{.*}}:{9:5-9:5}
11 // CHECK: fix-it:{{.*}}:{9:32-9:41}
12
13 class [[]] [[]]
14 attr_after_class_name_definition [[]] [[]] [[]]{}; // expected-error {{an attribute list cannot appear here}}
15 // CHECK: fix-it:{{.*}}:{14:4-14:4}
16 // CHECK: fix-it:{{.*}}:{14:37-14:51}
17
18 class base {};
19 class [[]] [[]] final_class
20 alignas(float) [[]] final // expected-error {{an attribute list cannot appear here}}
21 alignas(float) [[]] [[]] alignas(float): base{}; // expected-error {{an attribute list cannot appear here}}
22 // CHECK: fix-it:{{.*}}:{19:19-19:19}
23 // CHECK: fix-it:{{.*}}:{20:5-20:25}
24 // CHECK: fix-it:{{.*}}:{19:19-19:19}
25 // CHECK: fix-it:{{.*}}:{21:5-21:44}
26
27 class [[]] [[]] final_class_another
28 [[]] [[]] alignas(16) final // expected-error {{an attribute list cannot appear here}}
29 [[]] [[]] alignas(16) [[]]{}; // expected-error {{an attribute list cannot appear here}}
30 // CHECK: fix-it:{{.*}}:{27:19-27:19}
31 // CHECK: fix-it:{{.*}}:{28:5-28:27}
32 // CHECK: fix-it:{{.*}}:{27:19-27:19}
33 // CHECK: fix-it:{{.*}}:{29:5-29:31}
34}