File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
cpp/ql/src/semmle/code/cpp/exprs Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,16 @@ class Expr extends StmtParent, @expr {
8787 /** Gets the value of this expression, if it is a constant. */
8888 string getValue ( ) { exists ( @value v | values ( v , result ) and valuebind ( v , underlyingElement ( this ) ) ) }
8989
90+ /**
91+ * Walk along the sequence of `getConversion()s` until we reach
92+ * one with a valuetext, and then return that valuetext, if any.
93+ * For example, in an invocation of `#define THREE (1+2)`, there
94+ * will not be a valuetext for `1+2`, but the conversion `(1+2)`
95+ * will have valuetext `THREE`.
96+ */
9097 private string getValueTextFollowingConversions ( Expr e ) {
98+ e = this .getConversion * ( )
99+ and
91100 e .getValue ( ) = this .getValue ( )
92101 and
93102 ( if exists ( @value v |
You can’t perform that action at this time.
0 commit comments