aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/unused-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/unused-expr.c')
-rw-r--r--test/Sema/unused-expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c
index 97611168f1a2..056d09a8713b 100644
--- a/test/Sema/unused-expr.c
+++ b/test/Sema/unused-expr.c
@@ -82,7 +82,7 @@ void t5() {
int fn1() __attribute__ ((warn_unused_result));
int fn2() __attribute__ ((pure));
-int fn3() __attribute__ ((const));
+int fn3() __attribute__ ((__const));
// rdar://6587766
int t6() {
if (fn1() < 0 || fn2(2,1) < 0 || fn3(2) < 0) // no warnings
@@ -92,6 +92,7 @@ int t6() {
fn2(92, 21); // expected-warning {{ignoring return value of function declared with pure attribute}}
fn3(42); // expected-warning {{ignoring return value of function declared with const attribute}}
__builtin_fabsf(0); // expected-warning {{ignoring return value of function declared with const attribute}}
+ (void)0, fn1(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
return 0;
}