diff options
Diffstat (limited to 'clang/test/Preprocessor/non_fragile_feature.m')
-rw-r--r-- | clang/test/Preprocessor/non_fragile_feature.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/non_fragile_feature.m b/clang/test/Preprocessor/non_fragile_feature.m new file mode 100644 index 0000000..cf64df2 --- /dev/null +++ b/clang/test/Preprocessor/non_fragile_feature.m @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s +#ifndef __has_feature +#error Should have __has_feature +#endif + +#if !__has_feature(objc_nonfragile_abi) +#error Non-fragile ABI used for compilation but feature macro not set. +#endif + +#if !__has_feature(objc_weak_class) +#error objc_weak_class should be enabled with nonfragile abi +#endif |