mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add QLDoc to TRange.
This commit is contained in:
@@ -31,6 +31,12 @@ module GuardsInput implements SharedGuards::InputSig<Cpp::Location, Instruction,
|
||||
}
|
||||
|
||||
private newtype TConstantValue =
|
||||
// This is slightly abusing the shared guards library. Using
|
||||
// `TRange(40, 50)` to model a constant expression in the program such as
|
||||
// the literal "42" causes the shared guards library to make incorrect
|
||||
// inferences.
|
||||
// However, since we only use them to model `CaseConstant::asConstantValue`
|
||||
// this does not cause any wrong inferences (at least for now).
|
||||
TRange(string minValue, string maxValue) {
|
||||
minValue != maxValue and
|
||||
exists(EdgeKind::caseEdge(minValue, maxValue))
|
||||
|
||||
Reference in New Issue
Block a user