Clang Project

clang_source_code/test/SemaCXX/attr-cxx-disabled.cpp
1// RUN: %clang_cc1 -fsyntax-only -fno-double-square-bracket-attributes -verify -pedantic -std=c++11 -DERRORS %s
2// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify -pedantic -std=c++11 %s
3
4struct [[]] S {};
5
6#ifdef ERRORS
7// expected-error@-3 {{declaration of anonymous struct must be a definition}}
8// expected-warning@-4 {{declaration does not declare anything}}
9#else
10// expected-no-diagnostics
11#endif
12
13