-
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++/Java: Share core range analysis #14588
Conversation
if semNegative(x) | ||
then upper = false and delta = D::fromInt(0) | ||
else none() |
Check warning
Code scanning / CodeQL
Use of 'if' with a 'none()' branch. Warning
cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/SignAnalysisCommon.qll
Fixed
Show fixed
Hide fixed
cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/SignAnalysisCommon.qll
Fixed
Show fixed
Hide fixed
bestBound(e, b, delta, upper) | ||
module Sem implements Semantic { | ||
private import java as J | ||
private import SSA as SSA |
Check warning
Code scanning / CodeQL
Names only differing by case Warning
DCA looks good. |
I intend to postpone qldoc fixes until I've done some more refactoring. And I also don't want to fix the two remaining ql4ql alerts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for splitting this up into nice and readable commits ❤️!
This refactors the core part of range analysis to be shared between C++ and Java. Properly sharing the surrounding support files and further cleanup is left as followup work, as this PR should make sense to merge on its own.
Commit-by-commit review is highly encouraged.
The initial alignment between the two implementations has resulted in a number of minor bug fixes and feature tweaks.
java/constant-comparison
).