From 461a67fa15370a9ec88f8f8a240bf7c123bb2029 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:11:37 +0000 Subject: Vendor import of clang trunk r321017: https://llvm.org/svn/llvm-project/cfe/trunk@321017 --- test/Preprocessor/has_c_attribute.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/Preprocessor/has_c_attribute.c (limited to 'test/Preprocessor/has_c_attribute.c') diff --git a/test/Preprocessor/has_c_attribute.c b/test/Preprocessor/has_c_attribute.c new file mode 100644 index 0000000000000..dc22da7e4cd60 --- /dev/null +++ b/test/Preprocessor/has_c_attribute.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fdouble-square-bracket-attributes -std=c11 -E %s -o - | FileCheck %s + +// CHECK: has_fallthrough +#if __has_c_attribute(fallthrough) + int has_fallthrough(); +#endif + +// CHECK: does_not_have_selectany +#if !__has_c_attribute(selectany) + int does_not_have_selectany(); +#endif + -- cgit v1.2.3