Skip to content

Commit

Permalink
[Static Analyzer] Add handling of the -nostdlibinc option to ccc-an…
Browse files Browse the repository at this point in the history
…alyzer (#88017)

Compiler options recognizable to ccc-analyzer are stored in maps. An
option missing in the map will be dropped by ccc-analyzer. This causes a
build error in one of our projects that only happens in scan-build but
not regular build, because ccc-analyzer do not recognize `-nostdlibinc`.

This commit adds the option to the map.

rdar://126082053
  • Loading branch information
ziqingluo-90 committed Apr 9, 2024
1 parent 4bc4c7b commit 6393482
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clang/tools/scan-build/libexec/ccc-analyzer
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ sub Analyze {

my %CompileOptionMap = (
'-nostdinc' => 0,
'-nostdlibinc' => 0,
'-include' => 1,
'-idirafter' => 1,
'-imacros' => 1,
Expand Down

0 comments on commit 6393482

Please sign in to comment.