brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 48886ae Raw
18 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -verify -fsyntax-only -std=c++11 -fms-extensions %s2 3#if !__has_feature(attribute_deprecated_with_replacement)4#error "Missing __has_feature"5#endif6 7int a1 [[deprecated("warning", "fixit")]]; // expected-error{{'deprecated' attribute takes no more than 1 argument}}8int a2 [[deprecated("warning", 1)]]; // expected-error{{expected string literal as argument of 'deprecated' attribute}}9 10int b1 [[gnu::deprecated("warning", "fixit")]]; // expected-error{{'gnu::deprecated' attribute takes no more than 1 argument}}11int b2 [[gnu::deprecated("warning", 1)]]; // expected-error{{expected string literal as argument of 'deprecated' attribute}}12 13__declspec(deprecated("warning", "fixit")) int c1; // expected-error{{'deprecated' attribute takes no more than 1 argument}}14__declspec(deprecated("warning", 1)) int c2; // expected-error{{expected string literal as argument of 'deprecated' attribute}}15 16int d1 __attribute__((deprecated("warning", "fixit")));17int d2 __attribute__((deprecated("warning", 1))); // expected-error{{expected string literal as argument of 'deprecated' attribute}}18