c: make __has_attribute(const) work for const
function attribute. // rdar://10253857

llvm-svn: 161767
diff --git a/clang/test/Sema/unused-expr.c b/clang/test/Sema/unused-expr.c
index d8d8795..6081ce6 100644
--- a/clang/test/Sema/unused-expr.c
+++ b/clang/test/Sema/unused-expr.c
@@ -82,7 +82,9 @@
 
 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