Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Parser / attr-order.cpp
blob10bad38cac644707d9c93262304bce7d5253e4f5
1 // RUN: %clang_cc1 -fsyntax-only -fms-extensions -Wno-ignored-attributes -verify %s
3 struct [[]] __attribute__((lockable)) __declspec(dllexport) A {}; // ok
4 struct [[]] __declspec(dllexport) __attribute__((lockable)) B {}; // ok
5 struct [[]] [[]] __declspec(dllexport) __attribute__((lockable)) C {}; // ok
6 struct __declspec(dllexport) [[]] __attribute__((lockable)) D {}; // ok
7 struct __declspec(dllexport) __attribute__((lockable)) [[]] E {}; // ok
8 struct __attribute__((lockable)) __declspec(dllexport) [[]] F {}; // ok
9 struct __attribute__((lockable)) [[]] __declspec(dllexport) G {}; // ok
10 struct [[]] __attribute__((lockable)) [[]] __declspec(dllexport) H {}; // ok
12 [[noreturn]] __attribute__((cdecl)) __declspec(dllexport) void a(); // ok
13 [[noreturn]] __declspec(dllexport) __attribute__((cdecl)) void b(); // ok
14 [[]] [[noreturn]] __attribute__((cdecl)) __declspec(dllexport) void c(); // ok
16 __declspec(dllexport) [[noreturn]] __attribute__((cdecl)) void d(); // expected-error {{an attribute list cannot appear here}}
17 __declspec(dllexport) __attribute__((cdecl)) [[noreturn]] void e(); // expected-error {{an attribute list cannot appear here}}
18 __attribute__((cdecl)) __declspec(dllexport) [[noreturn]] void f(); // expected-error {{an attribute list cannot appear here}}
20 __attribute__((cdecl)) [[noreturn]] __declspec(dllexport) void g(); // ok
22 [[noreturn]] __attribute__((cdecl))
23 [[]]
24 __declspec(dllexport) void h();
26 template <int a>
27 __attribute__((cdecl)) [[noreturn]] __declspec(dllexport) void i(); // ok
29 template <int a>
30 [[]] [[noreturn]] __attribute__((cdecl)) __declspec(dllexport) void j(); // ok
32 template <int a>
33 [[noreturn]] __declspec(dllexport) __attribute__((cdecl)) void k(); // ok