mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-08 00:52:54 +00:00
4e1293b5e1
Summary: This is for use by clang-tidy's bugprone-use-after-move check -- see corresponding clang-tidy patch at https://reviews.llvm.org/D49910. Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49911 llvm-svn: 339569
16 lines
720 B
C++
16 lines
720 B
C++
// 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}}
|
|
};
|