diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 21:15:02 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 21:15:02 +0000 |
commit | 7513fa346cd7d657ccf8b5a4714527b74f8b9be7 (patch) | |
tree | a2f758f2a3e8ff0913ccebf730185158aa548bb1 /clang/test/Preprocessor/has_attribute.c | |
parent | 209bd65ea492d5ae713339314a52d9ae7421102d (diff) | |
download | bcm5719-llvm-7513fa346cd7d657ccf8b5a4714527b74f8b9be7.tar.gz bcm5719-llvm-7513fa346cd7d657ccf8b5a4714527b74f8b9be7.zip |
c: small refactoring of checking for __attribute__(const))
per Richard's comment.
llvm-svn: 161786
Diffstat (limited to 'clang/test/Preprocessor/has_attribute.c')
-rw-r--r-- | clang/test/Preprocessor/has_attribute.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/has_attribute.c b/clang/test/Preprocessor/has_attribute.c index 80f53a52fe3..711cf671cfe 100644 --- a/clang/test/Preprocessor/has_attribute.c +++ b/clang/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 + |