mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 14:05:49 -04:00

Sema::handleAnnotateAttr expects that some basic validation is done on the given AttributeList. However, ProcessAccessDeclAttributeList called it directly. Instead, pass the list to ProcessDeclAttribute. This fixes PR21847. llvm-svn: 224204
14 lines
373 B
C++
14 lines
373 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 one argument}}
|
|
};
|
|
|
|
void f(X x) {
|
|
x.foo();
|
|
}
|