Implement double underscore names support in __has_attribute
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151809 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/has_attribute.c b/test/Preprocessor/has_attribute.c
new file mode 100644
index 0000000..825fa06
--- /dev/null
+++ b/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