aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/has_attribute.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-13 21:15:02 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-13 21:15:02 +0000
commit10caec2600089449b58c065d56fc449d095b4536 (patch)
tree1a4a47c55059f9c897eb5eb9d34074831f6118e7 /test/Preprocessor/has_attribute.c
parent265f538b2c8b9e19196ce8a78a3da78671eb6f2b (diff)
c: small refactoring of checking for __attribute__(const))
per Richard's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor/has_attribute.c')
-rw-r--r--test/Preprocessor/has_attribute.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Preprocessor/has_attribute.c b/test/Preprocessor/has_attribute.c
index 80f53a52fe..711cf671cf 100644
--- a/test/Preprocessor/has_attribute.c
+++ b/test/Preprocessor/has_attribute.c
@@ -24,3 +24,13 @@ int has_has_attribute();
#if !__has_attribute(something_we_dont_have)
int has_something_we_dont_have();
#endif
+
+// rdar://10253857
+#if __has_attribute(__const)
+ int fn3() __attribute__ ((__const));
+#endif
+
+#if __has_attribute(const)
+ static int constFunction() __attribute__((const));
+#endif
+