[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / cxx11-base-spec-attributes.cpp
blob7338c5116c16c8c09b1b8d683e99c3de06ef41f2
1 // RUN: %clang_cc1 -std=c++11 %s -verify
3 struct A {};
4 struct B : [[]] A {};
5 struct C : [[]] virtual A {};
6 struct D : [[]] public virtual A {};
7 struct E : public [[]] virtual A {}; // expected-error {{an attribute list cannot appear here}}
8 struct F : virtual [[]] public A {}; // expected-error {{an attribute list cannot appear here}}
9 struct G : [[noreturn]] A {}; // expected-error {{'noreturn' attribute cannot be applied to a base specifier}}
10 struct H : [[unknown::foobar]] A {}; // expected-warning {{unknown attribute 'foobar' ignored}}