Skip to content

Commit 2a227b8

Browse files
committed
Pre-commit test: [Preprocessor] Do not expand macros if the input is already preprocessed
1 parent 211b51e commit 2a227b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %clang_cc1 -E -x c %s | FileCheck %s --check-prefixes=EXPANDED
2+
// RUN: %clang_cc1 -E -x cpp-output %s | FileCheck %s --check-prefixes=EXPANDED
3+
4+
// EXPANDED: void __attribute__((__attribute__((always_inline)))) foo()
5+
6+
#define always_inline __attribute__((always_inline))
7+
void __attribute__((always_inline)) foo() {
8+
return 4;
9+
}

0 commit comments

Comments
 (0)