Skip to content

[feat] Implicit include paths added with -idirafter #4315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Aug 16, 2024

GCC has implicit include paths that are forwarded to Clang. Until now these paths were added with -isystem flag, but sometimes the priority of this is too high: https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html The implicit include paths should be searched the last, so -isystem has been changed to -idirafter.
In case of potential backward compatibility break
--add-gcc-include-dirs-with-isystem has been introduced for "CodeChecker analyze" command.

@bruntib bruntib added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands bugfix 🔨 analyzer 📈 Related to the analyze commands (analysis driver) labels Aug 16, 2024
@bruntib bruntib added this to the release 6.24.1 milestone Aug 16, 2024
@bruntib bruntib requested review from noraz31 and cservakt August 16, 2024 09:43
@bruntib bruntib requested review from dkrupp and vodorok as code owners August 16, 2024 09:43
GCC has implicit include paths that are forwarded to Clang. Until now
these paths were added with -isystem flag, but sometimes the priority
of this is too high: https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
The implicit include paths should be searched the last, so -isystem has
been changed to -idirafter.
In case of potential backward compatibility break
--add-gcc-include-dirs-with-isystem has been introduced for
"CodeChecker analyze" command.
@bruntib bruntib force-pushed the isystem_vs_idirafter branch from 795117e to 2df162b Compare August 16, 2024 12:24
Copy link
Member

@dkrupp dkrupp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on both tmux and postgres and the idirafter/isystem parameters were appended correctly to the analysis commands. Both analysis were successful. So it will make a difference only in fewer cases.

LGTM

@dkrupp dkrupp merged commit b60576d into Ericsson:master Aug 16, 2024
8 checks passed
@bruntib bruntib deleted the isystem_vs_idirafter branch August 16, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bugfix 🔨 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants