summaryrefslogtreecommitdiffstats
path: root/test/Sema/block-sentinel-attribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/block-sentinel-attribute.c')
-rw-r--r--test/Sema/block-sentinel-attribute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Sema/block-sentinel-attribute.c b/test/Sema/block-sentinel-attribute.c
index b5ce0da..daf0a95 100644
--- a/test/Sema/block-sentinel-attribute.c
+++ b/test/Sema/block-sentinel-attribute.c
@@ -3,7 +3,8 @@
void (^e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1)));
int main() {
- void (^bbad) (int arg, const char * format) __attribute__ ((__sentinel__)) ; // expected-warning {{sentinel' attribute only supported for variadic blocks}}
+ void (^bbad) (int arg, const char * format) __attribute__ ((__sentinel__)) ; // expected-warning {{'sentinel' attribute only supported for variadic blocks}}
+ bbad = ^void (int arg, const char * format) __attribute__ ((__sentinel__)) {} ; // expected-warning {{'sentinel' attribute only supported for variadic blocks}}
void (^b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)) = // expected-note {{block has been explicitly marked sentinel here}}
^ __attribute__ ((__sentinel__)) (int arg, const char * format, ...) {};
void (^z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))) = ^ __attribute__ ((__sentinel__ (2))) (int arg, const char * format, ...) {}; // expected-note {{block has been explicitly marked sentinel here}}
OpenPOWER on IntegriCloud