summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-08-21 17:50:10 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-08-21 17:50:10 +0000
commit63e7ab18e5e23bc3f5c72be47f07d5ebfef29167 (patch)
tree7c7a4c2dd7e2f3a6ab128492b7f2134450508979 /clang/test
parent132fc5a8617f95388b756ab9893883b5ded89d22 (diff)
downloadbcm5719-llvm-63e7ab18e5e23bc3f5c72be47f07d5ebfef29167.tar.gz
bcm5719-llvm-63e7ab18e5e23bc3f5c72be47f07d5ebfef29167.zip
Address Aaron Ballman's post-commit review comments from r340306, NFC
llvm-svn: 340311
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/no_destroy.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/no_destroy.cpp b/clang/test/SemaCXX/no_destroy.cpp
index bdb8077cb58..7afbf999825 100644
--- a/clang/test/SemaCXX/no_destroy.cpp
+++ b/clang/test/SemaCXX/no_destroy.cpp
@@ -38,3 +38,9 @@ int main() {
[[clang::always_destroy]] [[clang::no_destroy]] int p; // expected-error{{'no_destroy' and 'always_destroy' attributes are not compatible}} // expected-note{{here}}
[[clang::no_destroy]] [[clang::always_destroy]] int p2; // expected-error{{'always_destroy' and 'no_destroy' attributes are not compatible}} // expected-note{{here}}
+
+[[clang::always_destroy]] void f() {} // expected-warning{{'always_destroy' attribute only applies to variables}}
+struct [[clang::no_destroy]] DoesntApply {}; // expected-warning{{'no_destroy' attribute only applies to variables}}
+
+[[clang::no_destroy(0)]] int no_args; // expected-error{{'no_destroy' attribute takes no arguments}}
+[[clang::always_destroy(0)]] int no_args2; // expected-error{{'always_destroy' attribute takes no arguments}}
OpenPOWER on IntegriCloud