mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
C#: Change reporting location of partial methods
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
public override Microsoft.CodeAnalysis.Location ReportingLocation =>
|
||||
IsCompilerGeneratedDelegate()
|
||||
? Symbol.ContainingType.GetSymbolLocation()
|
||||
: Symbol.GetSymbolLocation();
|
||||
: BodyDeclaringSymbol.GetSymbolLocation();
|
||||
|
||||
public override bool NeedsPopulation => base.NeedsPopulation || IsCompilerGeneratedDelegate();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
| Partial.cs:3:18:3:39 | PartialMethodWithBody1 | true |
|
||||
| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | true |
|
||||
| Partial.cs:5:17:5:23 | Method2 | false |
|
||||
| Partial.cs:10:18:10:39 | PartialMethodWithBody1 | true |
|
||||
| Partial.cs:11:17:11:23 | Method3 | false |
|
||||
| Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 | true |
|
||||
| Partial.cs:17:17:17:23 | Method4 | false |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass |
|
||||
| Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass |
|
||||
| Partial.cs:10:18:10:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:14:15:14:33 | OnePartPartialClass |
|
||||
| Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 |
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 |
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:10:18:10:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:11:17:11:23 | Method3 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:10:18:10:39 | PartialMethodWithBody1 |
|
||||
| Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:11:17:11:23 | Method3 |
|
||||
| Partial.cs:14:15:14:33 | OnePartPartialClass | Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 |
|
||||
| Partial.cs:14:15:14:33 | OnePartPartialClass | Partial.cs:17:17:17:23 | Method4 |
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
| Partial.cs:3:18:3:39 | PartialMethodWithBody1 | true |
|
||||
| Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | false |
|
||||
| Partial.cs:10:18:10:39 | PartialMethodWithBody1 | true |
|
||||
| Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 | false |
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Partial.cs:
|
||||
# 1| [Class] TwoPartClass
|
||||
# 3| 5: [Method] PartialMethodWithBody1
|
||||
# 3| -1: [TypeMention] Void
|
||||
# 10| 4: [BlockStmt] {...}
|
||||
# 4| 6: [Method] PartialMethodWithoutBody1
|
||||
# 4| 5: [Method] PartialMethodWithoutBody1
|
||||
# 4| -1: [TypeMention] Void
|
||||
# 5| 7: [Method] Method2
|
||||
# 5| 6: [Method] Method2
|
||||
# 5| -1: [TypeMention] Void
|
||||
# 5| 4: [BlockStmt] {...}
|
||||
# 10| 7: [Method] PartialMethodWithBody1
|
||||
# 3| -1: [TypeMention] Void
|
||||
# 10| 4: [BlockStmt] {...}
|
||||
# 11| 8: [Method] Method3
|
||||
# 11| -1: [TypeMention] Void
|
||||
# 11| 4: [BlockStmt] {...}
|
||||
|
||||
Reference in New Issue
Block a user