diff options
author | Vitek Karas <vitek.karas@microsoft.com> | 2021-05-31 21:28:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 21:28:55 +0300 |
commit | 493a448586c1fad68efc2126836f5bb9b5f9ad20 (patch) | |
tree | 6043095317001e2a40ca8eb23cf5cbd3a1bd8007 /test/Mono.Linker.Tests.Cases/DataFlow | |
parent | 6c33faaf912c3161f75d205da54b93847d647fe4 (diff) |
Use full MessageOrigin when reporting data flow warnings (#2070)
Recent chaneg introduced a scope stack to marking which carries `MessageOrigin` around so that warnings can be reported with precise origin. The one exception to this was the `ReflectionMethodBodyScanner`.
This change integrates the scope stack with `ReflectionMethodBodyScanner`. The visible result is more precise reporting of some warnings. This change will be needed for the work around compiler generated code (since then MessageOrigin will carry even more information than it does currently).
The main API change is addition of the `MessageOrigin` parameter to the `IReflectionPatternRecorder.UnrecognizedReflectionAccessPattern`. There are plans to remove this interface completely, so there' not much need to clean it up right now (so I left the potentially duplicated `origin` and `source` arguments as is).
The rest of the change is just correctly flowing the information around.
I also improved the test infra to be able to correctly handle `ExpectedWarning` with source/line info on all warnings.
There are visible changes in the `SourceLines` test where some warnings changed location (more precise now).
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/DataFlow')
0 files changed, 0 insertions, 0 deletions