-
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
[C++] Fails to detect control flow influence of nested “if” #18099
Comments
hi @JustusAdam I think you may be misunderstanding what
This is not the case for the nested condition, as there is a path going through Incidentally, from the snippet you posted and the presence of the |
Obviously disregard this comment if you just ran on the CLI to paste the result here 😅 |
Hi, thanks for the extensive answer. I had indeed misunderstood the predicate. So my question is wether such a "weaker" predicate exists that checks whether a given condition can influence a basic block? Thanks for the side note about the extension, I might try that though in general when it comes to program analysis tools I like to reduce the indirections to ensure I understand what the tool does and hence prefer a CLI 😅 . But I might give it a try. |
I don't think there is a weaker version like that. The main use case of |
Hi @JustusAdam, Can you clarify what you mean with "condition can influence"? |
The
controls
predicate inGuardCondition
fails to detect a control flow influence from a nestedif
. In the following example the influence fromcondition
tocall()
is only revealed in the firstif
, but not in the second.Query I tried:
Output I received:
I expected to also see an influence from line 17, but none is being found.
CodeQL version: 2.19.3
The text was updated successfully, but these errors were encountered: