blob: 129d359b8b7424d1dd05593e0ee2e1fcbeb7bea1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
[[clang::reinitializes]] int a; // expected-error {{'reinitializes' attribute only applies to non-static non-const member functions}}
[[clang::reinitializes]] void f(); // expected-error {{only applies to}}
struct A {
[[clang::reinitializes]] void foo();
__attribute__((reinitializes)) void gnu_foo();
[[clang::reinitializes]] void bar() const; // expected-error {{only applies to}}
[[clang::reinitializes]] static void baz(); // expected-error {{only applies to}}
[[clang::reinitializes]] int a; // expected-error {{only applies to}}
[[clang::reinitializes("arg")]] void qux(); // expected-error {{'reinitializes' attribute takes no arguments}}
};
|