Commit 2f23965
committed
[clang][driver] Suppress gnu-line-marker when saving temps
When passing `-save-temps` to clang, the generated preprocessed output uses gnu
line markers. This unexpectedly triggers gnu-line-marker warnings when used with
`-Weverything` or `-pedantic`. Even worse, compilation fails if `-Werror` is
used.
This change suppresses gnu-line-marker warnings when invoking clang with input
from a preprocessor job and the user has not otherwise explictly specified
`-Wgnu-line-marker` somewhere on the command line. Note that this does apply to
user provided preprocessed files.
fixes #638021 parent 37deb09 commit 2f23965
File tree
2 files changed
+41
-0
lines changed- clang
- lib/Driver/ToolChains
- test/Driver
2 files changed
+41
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
5077 | 5078 | | |
5078 | 5079 | | |
5079 | 5080 | | |
| 5081 | + | |
5080 | 5082 | | |
5081 | 5083 | | |
5082 | 5084 | | |
| |||
5101 | 5103 | | |
5102 | 5104 | | |
5103 | 5105 | | |
| 5106 | + | |
| 5107 | + | |
5104 | 5108 | | |
5105 | 5109 | | |
5106 | 5110 | | |
| |||
6506 | 6510 | | |
6507 | 6511 | | |
6508 | 6512 | | |
| 6513 | + | |
| 6514 | + | |
| 6515 | + | |
| 6516 | + | |
| 6517 | + | |
| 6518 | + | |
| 6519 | + | |
| 6520 | + | |
| 6521 | + | |
| 6522 | + | |
| 6523 | + | |
| 6524 | + | |
| 6525 | + | |
| 6526 | + | |
| 6527 | + | |
| 6528 | + | |
| 6529 | + | |
| 6530 | + | |
| 6531 | + | |
| 6532 | + | |
| 6533 | + | |
6509 | 6534 | | |
6510 | 6535 | | |
6511 | 6536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
0 commit comments