Skip to content

Commit 25706e0

Browse files
authored
Merge pull request github#6303 from hvitved/csharp/get-qual-name-nomagic
C#: Two `pragma` performance fixes
2 parents e0ff1d9 + 45ee216 commit 25706e0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

csharp/ql/src/semmle/code/csharp/Unification.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ module Gvn {
485485
/**
486486
* Gets the leaf GVN inside GVN `t`, by following the path `path`, if any.
487487
*/
488+
pragma[noinline]
488489
private GvnType getLeafTypeAt(GvnType t, TTypePath path) {
489490
result = getTypeAt(t, path) and
490491
not result instanceof ConstructedGvnType

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class NamedElement extends Element, @dotnet_named_element {
7474
* }
7575
* ```
7676
*/
77+
cached
7778
final string getQualifiedName() {
7879
exists(string qualifier, string name | this.hasQualifiedName(qualifier, name) |
7980
if qualifier = "" then result = name else result = qualifier + "." + name

0 commit comments

Comments
 (0)