summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/unused-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/unused-expr.c')
-rw-r--r--clang/test/Sema/unused-expr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Sema/unused-expr.c b/clang/test/Sema/unused-expr.c
index d8d8795278a..6081ce651f0 100644
--- a/clang/test/Sema/unused-expr.c
+++ b/clang/test/Sema/unused-expr.c
@@ -82,7 +82,9 @@ void t5() {
int fn1() __attribute__ ((warn_unused_result));
int fn2() __attribute__ ((pure));
-int fn3() __attribute__ ((const));
+#if __has_attribute(__const)
+int fn3() __attribute__ ((__const));
+#endif
// rdar://6587766
int t6() {
if (fn1() < 0 || fn2(2,1) < 0 || fn3(2) < 0) // no warnings
OpenPOWER on IntegriCloud