-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] CodeQL Fails to Process --include=<arg> in clang Commands #18019
Comments
You are right. Even though
I'll let the team know. As a workaround, could you try leaving out the Thanks for reporting! |
Hi @cradiator, Could you share the |
I guess the |
@aibaars Yes, I tried "--includeheader.h" and it works, the output database contains main.c's information. @jketema Here is is the |
Thanks for the logs. This should be fixed in CodeQL 2.20.0, which should be released in about a month. |
Summary
CodeQL does not handle the
--include=<arg>
format correctly when used in Clang commands.In Clang, the --include option instructs the compiler to include macros from a file before parsing. It can be specified in three formats:
-include<file>
,--include<file>
, and--include=<arg>
. However, CodeQL fails to correctly interpret the--include=<arg>
format.https://clang.llvm.org/docs/ClangCommandLineReference.html
Steps to Reproduce
Expected Behavior
The database should contain information from main.c.
Actual Behavior
The resulting database does not include information from main.c.
Error Log
The extractor's error log shows the following warning:
This indicates that the extractor incorrectly interprets
=header.h
as the file name, rather than recognizingheader.h
as the intended include file.The text was updated successfully, but these errors were encountered: