mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 14:26:07 +00:00

This allows using annotation in a much more contexts than it currently has. especially when annotation with template or constexpr. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D88645
14 lines
380 B
C++
14 lines
380 B
C++
// RUN: %clang_cc1 %s -fsyntax-only -verify
|
|
|
|
struct X {
|
|
public __attribute__((unavailable)): // expected-error {{access specifier can only have annotation attributes}}
|
|
void foo();
|
|
private __attribute__((annotate("foobar"))):
|
|
void bar();
|
|
private __attribute__((annotate())): // expected-error {{'annotate' attribute takes at least 1 argument}}
|
|
};
|
|
|
|
void f(X x) {
|
|
x.foo();
|
|
}
|