Commit 47a2b1b
committed
[Clang][Driver] New parameter allow-unrecognized-arguments
This parameter is used to suppress the ``Unknown argument '...'`` error
that clang will emit whenever it encounters an unknown argument.
This is probably an error to make sure the user fixes it's mistake by
either removing the argument or renaming it, but there are some cases
where it's not possible to fix the issue.
For instance, CMake now injects gcc-specific arguments in the clang-tidy
command that breaks static-analysis
(https://gitlab.kitware.com/cmake/cmake/-/issues/26283)
This will also allow users to run clang-tidy / clangd on a
gcc-based project without the need to maintain two separate
build commands to run llvm-based tools.
By enabling this parameter, the user is able to downgrade the error to a
warning (unknown-argument) that he can further silence using the
``-Qunused-arguments`` flag if needed.
Fixes: #1084551 parent 1d65d9c commit 47a2b1b
File tree
4 files changed
+40
-29
lines changed- clang
- include/clang/Driver
- lib
- Driver
- Frontend
- test/Driver
4 files changed
+40
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1014 | 1017 | | |
1015 | 1018 | | |
1016 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
316 | 322 | | |
317 | | - | |
318 | | - | |
319 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
320 | 327 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 328 | + | |
| 329 | + | |
326 | 330 | | |
327 | | - | |
328 | | - | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4991 | 4991 | | |
4992 | 4992 | | |
4993 | 4993 | | |
4994 | | - | |
4995 | | - | |
4996 | | - | |
4997 | | - | |
4998 | | - | |
4999 | | - | |
5000 | | - | |
5001 | | - | |
5002 | | - | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
5003 | 5005 | | |
5004 | 5006 | | |
5005 | 5007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments