Skip to content

Commit 3c6db09

Browse files
committed
Java: Cache the other compiletimeconstant value predicates
1 parent e75ed5a commit 3c6db09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class CompileTimeConstantExpr extends Expr {
180180
/**
181181
* Gets the string value of this expression, where possible.
182182
*/
183-
pragma[nomagic]
183+
cached
184184
string getStringValue() {
185185
result = this.(StringLiteral).getValue()
186186
or
@@ -205,7 +205,7 @@ class CompileTimeConstantExpr extends Expr {
205205
/**
206206
* Gets the boolean value of this expression, where possible.
207207
*/
208-
pragma[nomagic]
208+
cached
209209
boolean getBooleanValue() {
210210
// Literal value.
211211
result = this.(BooleanLiteral).getBooleanValue()

0 commit comments

Comments
 (0)