xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/cxx11-base-spec-attributes.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 %s -verify
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc struct A {};
4*f4a2713aSLionel Sambuc struct B : [[]] A {};
5*f4a2713aSLionel Sambuc struct C : [[]] virtual A {};
6*f4a2713aSLionel Sambuc struct D : [[]] public virtual A {};
7*f4a2713aSLionel Sambuc struct E : public [[]] virtual A {}; // expected-error {{an attribute list cannot appear here}}
8*f4a2713aSLionel Sambuc struct F : virtual [[]] public A {}; // expected-error {{an attribute list cannot appear here}}
9*f4a2713aSLionel Sambuc struct G : [[noreturn]] A {}; // expected-error {{'noreturn' attribute cannot be applied to a base specifier}}
10*f4a2713aSLionel Sambuc struct H : [[unknown::foobar]] A {}; // expected-warning {{unknown attribute 'foobar' ignored}}
11