Commit 1bbbfa0
committed
cswrap-core: skip known wrappers while invoking an analyzer
We want to hook `gcc -fanalyzer` on `clang` if `clang` is used as the
system compiler. However, it does not make sense to hook GCC Analyzer
on `clang --analyze`, which is invoked by `csclng` while wrapping `gcc`
as the system compiler.
Apart from wasting resources by running multiple processes of GCC
Analyzer in parallel, this was causing unnecessary noise in `scan.log`
as GCC Analyzer complained about unsupported flags, which were injected
by `csclng` for `clang --analyze` only:
```
gcc: error: unrecognized command-line option ‘-fno-caret-diagnostics’
gcc: error: unrecognized command-line option ‘-fno-caret-diagnostics’
gcc: error: unrecognized command-line option ‘-fno-caret-diagnostics’
```
Reported-by: Lukáš Zaoral
Fixes: commit 983b895
Related: #43
Closes: #441 parent 983b895 commit 1bbbfa0
2 files changed
Lines changed: 59 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
369 | 424 | | |
370 | 425 | | |
371 | 426 | | |
| |||
437 | 492 | | |
438 | 493 | | |
439 | 494 | | |
| 495 | + | |
440 | 496 | | |
441 | 497 | | |
442 | 498 | | |
| |||
0 commit comments