diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-09 00:57:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-09 00:57:56 +0000 |
commit | baf2912b402f695cd6b957df47fdc9a50c0a5b6a (patch) | |
tree | 4bedccc4aaeb4c707e51be872355fead67704441 /clang/test/Preprocessor/has_attribute.c | |
parent | 2f672d610e97a671c742689e12560eaeadf94f15 (diff) | |
download | bcm5719-llvm-baf2912b402f695cd6b957df47fdc9a50c0a5b6a.tar.gz bcm5719-llvm-baf2912b402f695cd6b957df47fdc9a50c0a5b6a.zip |
Generalize hack allowing 'const' in __has_attribute (etc) to allow any token
with identifier info. This covers most identifier-like entities (other than
the ISO646 keywords).
llvm-svn: 185895
Diffstat (limited to 'clang/test/Preprocessor/has_attribute.c')
-rw-r--r-- | clang/test/Preprocessor/has_attribute.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/has_attribute.c b/clang/test/Preprocessor/has_attribute.c index 711cf671cfe..555c2b3f9e2 100644 --- a/clang/test/Preprocessor/has_attribute.c +++ b/clang/test/Preprocessor/has_attribute.c @@ -34,3 +34,7 @@ int has_something_we_dont_have(); static int constFunction() __attribute__((const)); #endif +// CHECK: has_no_volatile_attribute +#if !__has_attribute(volatile) +int has_no_volatile_attribute(); +#endif |