Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaCXX/attr-reinitializes.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// 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}} };