Skip to content

Commit 924d23f

Browse files
committed
Cache the computation of core toString predicates.
1 parent 6e6dab9 commit 924d23f

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

cpp/ql/src/semmle/code/cpp/Element.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pragma[inline]
4747
*/
4848
class ElementBase extends @element {
4949
/** Gets a textual representation of this element. */
50+
cached
5051
string toString() { none() }
5152

5253
/**

csharp/ql/src/semmle/code/dotnet/Element.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import semmle.code.csharp.Location
1010
*/
1111
class Element extends @dotnet_element {
1212
/** Gets a textual representation of this element. */
13+
cached
1314
string toString() { none() }
1415

1516
/** Gets the location of this element. */

java/ql/src/semmle/code/Location.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class Top extends @top {
8484
int getNumberOfCommentLines() { numlines(this, _, _, result) }
8585

8686
/** Gets a textual representation of this element. */
87+
cached
8788
string toString() { hasName(this, result) }
8889
}
8990

0 commit comments

Comments
 (0)