aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Preprocessor/preprocess-cpp-output.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Preprocessor/preprocess-cpp-output.c')
-rw-r--r--clang/test/Preprocessor/preprocess-cpp-output.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/preprocess-cpp-output.c b/clang/test/Preprocessor/preprocess-cpp-output.c
new file mode 100644
index 0000000..2c18060
--- /dev/null
+++ b/clang/test/Preprocessor/preprocess-cpp-output.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -E -x c %s | FileCheck %s --check-prefixes=EXPANDED
+// RUN: %clang_cc1 -E -x cpp-output %s | FileCheck %s --check-prefixes=NOT-EXPANDED
+
+// EXPANDED: void __attribute__((__attribute__((always_inline)))) foo()
+// NOT-EXPANDED: void __attribute__((always_inline)) foo()
+
+#define always_inline __attribute__((always_inline))
+void __attribute__((always_inline)) foo() {
+ return 4;
+}