mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add toString for RelationStrictness
This helps for debugging.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import cpp
|
||||
|
||||
/**
|
||||
* Describes whether a relation is 'strict' (that is, a `<` or `>`
|
||||
* The strictness of a relation. Either 'strict' (that is, a `<` or `>`
|
||||
* relation) or 'non-strict' (a `<=` or `>=` relation).
|
||||
*/
|
||||
newtype RelationStrictness =
|
||||
newtype TRelationStrictness =
|
||||
/**
|
||||
* Represents that a relation is 'strict' (that is, a `<` or `>` relation).
|
||||
*/
|
||||
@@ -14,6 +14,19 @@ newtype RelationStrictness =
|
||||
*/
|
||||
Nonstrict()
|
||||
|
||||
/**
|
||||
* The strictness of a relation. Either 'strict' (that is, a `<` or `>`
|
||||
* relation) or 'non-strict' (a `<=` or `>=` relation).
|
||||
*/
|
||||
class RelationStrictness extends TRelationStrictness {
|
||||
/** Gets the string representation of this relation strictness. */
|
||||
string toString() {
|
||||
this = Strict() and result = "strict"
|
||||
or
|
||||
this = Nonstrict() and result = "non-strict"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes whether a relation is 'greater' (that is, a `>` or `>=`
|
||||
* relation) or 'lesser' (a `<` or `<=` relation).
|
||||
|
||||
Reference in New Issue
Block a user