access-spec-attrs.cpp 373 B

12345678910111213
  1. // RUN: %clang_cc1 %s -fsyntax-only -verify
  2. struct X {
  3. public __attribute__((unavailable)): // expected-error {{access specifier can only have annotation attributes}}
  4. void foo();
  5. private __attribute__((annotate("foobar"))):
  6. void bar();
  7. private __attribute__((annotate())): // expected-error {{'annotate' attribute takes one argument}}
  8. };
  9. void f(X x) {
  10. x.foo();
  11. }