diff options
Diffstat (limited to 'clang/test/Preprocessor/has_attribute.cpp')
-rw-r--r-- | clang/test/Preprocessor/has_attribute.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/clang/test/Preprocessor/has_attribute.cpp b/clang/test/Preprocessor/has_attribute.cpp index 2cfa005fb09..53d1fb07b9e 100644 --- a/clang/test/Preprocessor/has_attribute.cpp +++ b/clang/test/Preprocessor/has_attribute.cpp @@ -18,17 +18,21 @@ // The attribute name can be bracketed with double underscores. // CHECK: has_clang_fallthrough_2 #if __has_cpp_attribute(clang::__fallthrough__) - int has_clang_fallthrough_2(); -#endif - -// The scope cannot be bracketed with double underscores. -// CHECK: does_not_have___clang___fallthrough -#if !__has_cpp_attribute(__clang__::fallthrough) - int does_not_have___clang___fallthrough(); -#endif - -// Test that C++11, target-specific attributes behave properly. - + int has_clang_fallthrough_2();
+#endif
+
+// The scope cannot be bracketed with double underscores unless it is for gnu.
+// CHECK: does_not_have___clang___fallthrough
+#if !__has_cpp_attribute(__clang__::fallthrough)
+ int does_not_have___clang___fallthrough();
+#endif
+// CHECK: has_gnu_const
+#if __has_cpp_attribute(__gnu__::__const__)
+ int has_gnu_const();
+#endif
+
+// Test that C++11, target-specific attributes behave properly.
+
// CHECK: does_not_have_mips16 #if !__has_cpp_attribute(gnu::mips16) int does_not_have_mips16(); |