-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reference live ILLink analyzer (#93259)
In faf883d I inadvertently turned off the trim analyzer for libraries, because the analyzer bits don't flow to the consuming project with the ILLink.Tasks ProjectReference. This adds a separate ProjectReference to use the live analyzer. This addresses #88901 for the ILLink analyzers. Using the live analyzer uncovered some bugs that are fixed in this change: - Invalid assert for field initializers with `throw` statements - Invalid cast to `IMethodSymbol` for the ContainingSymbol of a local. Locals can occur in field initializers, when created from out params. - Wrong warning code produced for assignment to annotated property in an initializer. This was being treated as a call to the setter instead of an assignment to the underlying field: `Type AnnotatedPropertyWithSetter { get; set; } = GetUnknown ();` - Invalid assert for delegate creation where the delegate is created from anything other than a method (for example, a field that has an Action or Func type). - Assert inside GetFlowCaptureValue for the LHS of a compound assignment. I couldn't think of a case yet where we actually need to model the result of the assignment, so I implemented support for at least visiting the LHS by going through the same path as normal assignments (avoiding GetFlowCaptureValue).
- Loading branch information
Showing
8 changed files
with
215 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.