Commit 2298cdc
committed
[Clang][Preprocessor] Enable macro expansion **only** in directives when parsing preprocessed sources
The preprocessor does not expand macro-identifiers in #pragma
directives.
When we preprocess & parse the code, clang expands the macros in
the directives.
When we parse already preprocessed code, clang still has to expand the
macros in the directives.
This also means that we're not always able to parse the preprocessor's
output without preserving the definitions (-dD).1 parent 279487b commit 2298cdc
File tree
3 files changed
+7
-5
lines changed- clang
- include/clang
- Frontend
- Lex
- test/Preprocessor
3 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1837 | 1837 | | |
1838 | 1838 | | |
1839 | 1839 | | |
1840 | | - | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
1841 | 1843 | | |
1842 | 1844 | | |
1843 | 1845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments