mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Merge pull request #680 from hvitved/csharp/data-flow-performance-tweaks
C#: Minor data flow performance tweaks
This commit is contained in:
@@ -28,6 +28,7 @@ module DataFlow {
|
||||
DotNet::Type getType() { none() }
|
||||
|
||||
/** Gets the enclosing callable of this node. */
|
||||
cached
|
||||
DotNet::Callable getEnclosingCallable() { none() }
|
||||
|
||||
/** Gets a textual representation of this node. */
|
||||
@@ -52,9 +53,19 @@ module DataFlow {
|
||||
|
||||
override DotNet::Callable getEnclosingCallable() { result = expr.getEnclosingCallable() }
|
||||
|
||||
override string toString() { result = expr.toString() }
|
||||
override string toString() {
|
||||
result = expr.(Expr).toString()
|
||||
or
|
||||
expr instanceof CIL::Expr and
|
||||
result = "CIL expression"
|
||||
}
|
||||
|
||||
override Location getLocation() { result = expr.getLocation() }
|
||||
override Location getLocation() {
|
||||
result = expr.(Expr).getLocation()
|
||||
or
|
||||
result.getFile().isPdbSourceFile() and
|
||||
result = expr.(CIL::Expr).getALocation()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user