diff options
author | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-03-01 14:53:16 +0000 |
---|---|---|
committer | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-03-01 14:53:16 +0000 |
commit | 908f130d584964adc74d7ac8acd142bc9494cbb7 (patch) | |
tree | feaf2fb1b139e3be5112cf97f85a2342d9d9c8c0 /clang/test/Preprocessor/has_attribute.c | |
parent | 8e9d772c5af4e567af150297b2c99da4dee7bdf2 (diff) | |
download | bcm5719-llvm-908f130d584964adc74d7ac8acd142bc9494cbb7.tar.gz bcm5719-llvm-908f130d584964adc74d7ac8acd142bc9494cbb7.zip |
Implement double underscore names support in __has_attribute
llvm-svn: 151809
Diffstat (limited to 'clang/test/Preprocessor/has_attribute.c')
-rw-r--r-- | clang/test/Preprocessor/has_attribute.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/has_attribute.c b/clang/test/Preprocessor/has_attribute.c new file mode 100644 index 00000000000..825fa06df66 --- /dev/null +++ b/clang/test/Preprocessor/has_attribute.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 %s +// RUN: %clang_cc1 %s -E +#ifndef __has_attribute +#error Should have __has_attribute +#endif + +#if __has_attribute(something_we_dont_have) +#error Bad +#endif + +#if !__has_attribute(__always_inline__) || \ + !__has_attribute(always_inline) +#error Clang should have this +#endif |