summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/renderscript.rs
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2016-06-10 21:51:18 +0000
committerPirama Arumuga Nainar <pirama@google.com>2016-06-10 21:51:18 +0000
commite5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6 (patch)
tree142fe9c170ff63b95ff19741bf38cc5c05976224 /clang/test/Sema/renderscript.rs
parent97609bb2fdb1db561b2ca0f32ff4fa413ef4e094 (diff)
downloadbcm5719-llvm-e5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6.tar.gz
bcm5719-llvm-e5d2d71a60fbe4cddcb7a070f0eed1648b3d40c6.zip
Revise RenderScript attribute declaration
Summary: Address post-patch comments to r272342. - Rename the 'kernel' attribute's name - Idiomatically restrict the attribute to the 'RenderScript' LangOpt. Reviewers: aaron.ballman, rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21240 llvm-svn: 272438
Diffstat (limited to 'clang/test/Sema/renderscript.rs')
-rw-r--r--clang/test/Sema/renderscript.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/test/Sema/renderscript.rs b/clang/test/Sema/renderscript.rs
index c6ffb4df1cf..80be5ae424f 100644
--- a/clang/test/Sema/renderscript.rs
+++ b/clang/test/Sema/renderscript.rs
@@ -2,11 +2,15 @@
// RUN: %clang_cc1 -fsyntax-only -verify -x c %s
#ifndef __RENDERSCRIPT__
-// expected-warning@+2 {{kernel attribute ignored}}
+// expected-warning@+2 {{'kernel' attribute ignored}}
#endif
-void __attribute__((kernel)) kernel();
+void __attribute__((kernel)) kernel() {}
-// expected-warning@+1 {{'kernel' attribute only applies to functions}}
+#ifndef __RENDERSCRIPT__
+// expected-warning@+4 {{'kernel' attribute ignored}}
+#else
+// expected-warning@+2 {{'kernel' attribute only applies to functions}}
+#endif
int __attribute__((kernel)) global;
#ifndef __RENDERSCRIPT__
OpenPOWER on IntegriCloud