diff options
Diffstat (limited to 'test/Sema/unused-expr.c')
-rw-r--r-- | test/Sema/unused-expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c index 70f3446e53..284818dc58 100644 --- a/test/Sema/unused-expr.c +++ b/test/Sema/unused-expr.c @@ -96,3 +96,8 @@ int t6() { int t7 __attribute__ ((warn_unused_result)); // expected-warning {{warning: 'warn_unused_result' attribute only applies to function types}} +// PR4010 +int (*fn4)(void) __attribute__ ((warn_unused_result)); +void t8() { + fn4(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}} +} |