Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / attr-extension-diags.cpp
blob9a5f6977396ceecd84364eb9bb8b27508c2e5608
1 // RUN: %clang_cc1 -std=c++11 -verify=ext -fsyntax-only -Wfuture-attribute-extensions %s
2 // RUN: %clang_cc1 -std=c++11 -verify -fsyntax-only -Wno-future-attribute-extensions %s
3 // RUN: %clang_cc1 -std=c++11 -verify -fsyntax-only -Wno-c++14-attribute-extensions -Wno-c++17-attribute-extensions -Wno-c++20-attribute-extensions %s
5 // expected-no-diagnostics
7 [[deprecated]] int func1(); // ext-warning {{use of the 'deprecated' attribute is a C++14 extension}}
8 [[deprecated("msg")]] int func2(); // ext-warning {{use of the 'deprecated' attribute is a C++14 extension}}
10 [[nodiscard]] int func3(); // ext-warning {{use of the 'nodiscard' attribute is a C++17 extension}}
11 [[nodiscard("msg")]] int func4(); // ext-warning {{use of the 'nodiscard' attribute is a C++20 extension}}
13 void func5() {
14 if (true) [[likely]]; // ext-warning {{use of the 'likely' attribute is a C++20 extension}}