mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: Cache Element.toString
This commit is contained in:
@@ -29,7 +29,15 @@ module Generated {
|
||||
/**
|
||||
* Gets the string representation of this element.
|
||||
*/
|
||||
string toString() { none() } // overridden by subclasses
|
||||
cached
|
||||
final string toString() { result = this.toStringImpl() }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* Gets the string representation of this element.
|
||||
*/
|
||||
abstract string toStringImpl();
|
||||
|
||||
/**
|
||||
* Gets the name of a primary CodeQL class to which this element belongs.
|
||||
|
||||
Reference in New Issue
Block a user