mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
C++: Split valuetext off into its own table
This commit is contained in:
@@ -85,10 +85,10 @@ class Expr extends StmtParent, @expr {
|
||||
override string toString() { none() }
|
||||
|
||||
/** Gets the value of this expression, if it is a constant. */
|
||||
string getValue() { exists(@value v | values(v,result,_) and valuebind(v,underlyingElement(this))) }
|
||||
string getValue() { exists(@value v | values(v,result) and valuebind(v,underlyingElement(this))) }
|
||||
|
||||
/** Gets the source text for the value of this expression, if it is a constant. */
|
||||
string getValueText() { exists(@value v | values(v,_,result) and valuebind(v,underlyingElement(this))) }
|
||||
string getValueText() { exists(@value v | valuetext(v,result) and valuebind(v,underlyingElement(this))) }
|
||||
|
||||
/** Holds if this expression has a value that can be determined at compile time. */
|
||||
cached
|
||||
|
||||
@@ -1237,11 +1237,15 @@ expr_cond_false(
|
||||
int false: @expr ref
|
||||
);
|
||||
|
||||
// the second field is a string representation of the value
|
||||
// the third field is the actual text in the source or the same as the second field
|
||||
/** A string representation of the value. */
|
||||
values(
|
||||
unique int id: @value,
|
||||
string str: string ref,
|
||||
string str: string ref
|
||||
);
|
||||
|
||||
/** The actual text in the source code for the value, if any. */
|
||||
valuetext(
|
||||
unique int id: @value ref,
|
||||
string text: string ref
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user