diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/Preprocessor/has_attribute.c | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/Preprocessor/has_attribute.c')
-rw-r--r-- | test/Preprocessor/has_attribute.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Preprocessor/has_attribute.c b/test/Preprocessor/has_attribute.c new file mode 100644 index 0000000..80f53a5 --- /dev/null +++ b/test/Preprocessor/has_attribute.c @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -E %s -o - | FileCheck %s + +// CHECK: always_inline +#if __has_attribute(always_inline) +int always_inline(); +#endif + +// CHECK: __always_inline__ +#if __has_attribute(__always_inline__) +int __always_inline__(); +#endif + +// CHECK: no_dummy_attribute +#if !__has_attribute(dummy_attribute) +int no_dummy_attribute(); +#endif + +// CHECK: has_has_attribute +#ifdef __has_attribute +int has_has_attribute(); +#endif + +// CHECK: has_something_we_dont_have +#if !__has_attribute(something_we_dont_have) +int has_something_we_dont_have(); +#endif |