28 references to AddDiagnostic
ILLink.RoslynAnalyzer (28)
RequiresAnalyzerBase.cs (1)
275
diagnosticContext.
AddDiagnostic
(RequiresDiagnosticId, member.GetDisplayName(), message, url);
RequiresAssemblyFilesAnalyzer.cs (2)
117
diagnosticContext.
AddDiagnostic
(DiagnosticId.AvoidAssemblyGetFilesInSingleFile, member.GetDisplayName());
123
diagnosticContext.
AddDiagnostic
(DiagnosticId.AvoidAssemblyLocationInSingleFile, member.GetDisplayName());
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (13)
402
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedTypeInRuntimeHelpersRunClassConstructor, calledMethod.GetDisplayName());
907
_diagnosticContext.
AddDiagnostic
(DiagnosticId.PropertyAccessorParameterInLinqExpressionsCannotBeStaticallyDetermined,
1004
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
1017
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
1077
_diagnosticContext.
AddDiagnostic
(DiagnosticId.CaseInsensitiveTypeGetTypeCallIsNotSupported, calledMethod.GetDisplayName());
1109
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedTypeNameInTypeGetType, calledMethod.GetDisplayName());
1189
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericType, calledMethod.GetDisplayName());
1201
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericType, calledMethod.GetDisplayName());
1388
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, calledMethod.GetDisplayName());
1543
_diagnosticContext.
AddDiagnostic
(DiagnosticId.ParametersOfAssemblyCreateInstanceCannotBeAnalyzed, calledMethod.GetDisplayName());
1744
_diagnosticContext.
AddDiagnostic
(DiagnosticId.MakeGenericMethod, reflectionMethod.GetDisplayName());
1807
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy(calledMethod, (ParameterIndex)1 + offset).GetDisplayName(), calledMethod.GetDisplayName());
1813
_diagnosticContext.
AddDiagnostic
(DiagnosticId.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy(calledMethod, (ParameterIndex)0 + offset).GetDisplayName(), calledMethod.GetDisplayName());
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\RequireDynamicallyAccessedMembersAction.cs (1)
96
_diagnosticContext.
AddDiagnostic
(diagnosticId, targetValue.GetDiagnosticArgumentsForAnnotationMismatch().ToArray());
TrimAnalysis\FeatureCheckReturnValuePattern.cs (2)
43
diagnosticContext.
AddDiagnostic
(
64
diagnosticContext.
AddDiagnostic
(
TrimAnalysis\HandleCallAction.cs (2)
205
_diagnosticContext.
AddDiagnostic
(DiagnosticId.TypeMapGroupTypeCannotBeStaticallyDetermined,
323
_diagnosticContext.
AddDiagnostic
(DiagnosticId.RequiresUnreferencedCode, calledMethod.GetDisplayName(), message, url);
TrimAnalysis\ReflectionAccessAnalyzer.cs (6)
100
diagnosticContext.
AddDiagnostic
(DiagnosticId.RequiresUnreferencedCode, member.GetDisplayName(), message, url);
154
diagnosticContext.
AddDiagnostic
(id, _typeHierarchyType!.GetDisplayName(),
163
diagnosticContext.
AddDiagnostic
(id, _typeHierarchyType!.GetDisplayName(), member.GetDisplayName());
172
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection, methodSymbol.GetDisplayName());
180
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersMethodAccessedViaReflection, methodSymbol.GetDisplayName());
219
diagnosticContext.
AddDiagnostic
(DiagnosticId.DynamicallyAccessedMembersFieldAccessedViaReflection, fieldSymbol.GetDisplayName());
TrimAnalysis\TypeNameResolver.cs (1)
38
diagnosticContext.
AddDiagnostic
(DiagnosticId.TypeNameIsNotAssemblyQualified, typeNameString);