llvm-for-llvmta/tools/clang/test/Parser/cxx1z-attributes.cpp

15 lines
385 B
C++
Raw Permalink Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++1z %s
namespace [[]] foo {}
namespace [[]] {}
namespace [[]] bad = foo; // expected-error {{attributes cannot be specified on namespace alias}}
namespace [[]] A::B {} // expected-error {{attributes cannot be specified on a nested namespace definition}}
enum test {
bing [[]],
bar [[]] = 1,
baz [[]][[]],
quux [[]][[]] = 4
};