mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Cache the computation of core toString predicates.
This commit is contained in:
@@ -47,6 +47,7 @@ pragma[inline]
|
||||
*/
|
||||
class ElementBase extends @element {
|
||||
/** Gets a textual representation of this element. */
|
||||
cached
|
||||
string toString() { none() }
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@ import semmle.code.csharp.Location
|
||||
*/
|
||||
class Element extends @dotnet_element {
|
||||
/** Gets a textual representation of this element. */
|
||||
cached
|
||||
string toString() { none() }
|
||||
|
||||
/** Gets the location of this element. */
|
||||
|
||||
@@ -84,6 +84,7 @@ class Top extends @top {
|
||||
int getNumberOfCommentLines() { numlines(this, _, _, result) }
|
||||
|
||||
/** Gets a textual representation of this element. */
|
||||
cached
|
||||
string toString() { hasName(this, result) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user