236 references to DiagnosticId
illink (236)
Linker.Dataflow\CompilerGeneratedState.cs (7)
136
List<(MessageOrigin,
DiagnosticId
, string[])>? _warnings = null;
141
void AddWarning(MessageOrigin origin,
DiagnosticId
id, params string[] messageArgs)
143
_warnings ??= new List<(MessageOrigin,
DiagnosticId
, string[])>();
191
AddWarning(new MessageOrigin(method),
DiagnosticId
.MethodsAreAssociatedWithUserMethod, method.GetDisplayName(), alreadyAssociatedMethod.GetDisplayName(), generatedType.GetDisplayName());
250
AddWarning(new MessageOrigin(method),
DiagnosticId
.MethodsAreAssociatedWithStateMachine, method.GetDisplayName(), alreadyAssociatedMethod.GetDisplayName(), stateMachineType.GetDisplayName());
319
AddWarning(new MessageOrigin(userDefinedMethod),
DiagnosticId
.MethodsAreAssociatedWithUserMethod, userDefinedMethod.GetDisplayName(), alreadyAssociatedMethod.GetDisplayName(), nestedFunction.GetDisplayName());
349
AddWarning(new MessageOrigin(method),
DiagnosticId
.MethodsAreAssociatedWithUserMethod, method.GetDisplayName(), alreadyAssociatedMethod.GetDisplayName(), generatedType.GetDisplayName());
Linker.Dataflow\DiagnosticContext.cs (2)
17
public partial void AddDiagnostic(
DiagnosticId
id, params string[] args)
24
public partial void AddDiagnostic(
DiagnosticId
id, ValueWithDynamicallyAccessedMembers actualValue, ValueWithDynamicallyAccessedMembers expectedAnnotationsValue, params string[] args)
Linker.Dataflow\FlowAnnotations.cs (15)
262
_context.LogWarning(member,
DiagnosticId
.AttributeDoesntHaveTheRequiredNumberOfParameters, "System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute");
288
_context.LogWarning(field,
DiagnosticId
.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings, field.GetDisplayName());
309
_context.LogWarning(method,
DiagnosticId
.DynamicallyAccessedMembersIsNotAllowedOnMethods);
321
_context.LogWarning(method,
DiagnosticId
.DynamicallyAccessedMembersIsNotAllowedOnMethods);
323
_context.LogWarning(method,
DiagnosticId
.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings,
335
_context.LogWarning(method,
DiagnosticId
.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings, method.GetDisplayName());
385
_context.LogWarning(property,
DiagnosticId
.DynamicallyAccessedMembersIsNotAllowedOnExtensionProperties, property.GetDisplayName());
391
_context.LogWarning(property,
DiagnosticId
.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings, property.GetDisplayName());
422
_context.LogWarning(setMethod,
DiagnosticId
.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName(), setMethod.GetDisplayName());
466
_context.LogWarning(getMethod,
DiagnosticId
.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName(), getMethod.GetDisplayName());
488
_context.LogWarning(backingField,
DiagnosticId
.DynamicallyAccessedMembersOnPropertyConflictsWithBackingField, property.GetDisplayName(), backingField.GetDisplayName());
700
_context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides,
705
_context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides,
710
_context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnImplicitThisBetweenOverrides,
715
_context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnGenericParameterBetweenOverrides,
Linker.Dataflow\HandleCallAction.cs (3)
63
_diagnosticContext.AddDiagnostic(
DiagnosticId
.CorrectnessOfCOMCannotBeGuaranteed, calledMethod.GetDisplayName());
204
_diagnosticContext.AddDiagnostic(
DiagnosticId
.TypeMapGroupTypeCannotBeStaticallyDetermined, method.GenericArguments[0].FullName);
286
_diagnosticContext.AddDiagnostic(
DiagnosticId
.UnresolvedAssemblyInCreateInstance,
Linker.Dataflow\MethodBodyScanner.cs (2)
206
(int)
DiagnosticId
.LinkerUnexpectedError,
965
(int)
DiagnosticId
.LinkerUnexpectedError,
Linker.Steps\BodySubstitutionParser.cs (10)
61
LogWarning(methodNav,
DiagnosticId
.XmlCouldNotFindMethodOnType, signature, type.GetDisplayName());
77
LogWarning(methodNav,
DiagnosticId
.XmlInvalidValueForStub, method.GetDisplayName());
87
LogWarning(methodNav,
DiagnosticId
.XmlUnkownBodyModification, action, method.GetDisplayName());
102
LogWarning(fieldNav,
DiagnosticId
.XmlCouldNotFindFieldOnType, name, type.GetDisplayName());
108
LogWarning(fieldNav,
DiagnosticId
.XmlSubstitutedFieldNeedsToBeStatic, field.GetDisplayName());
115
LogWarning(fieldNav,
DiagnosticId
.XmlMissingSubstitutionValueForField, field.GetDisplayName());
120
LogWarning(fieldNav,
DiagnosticId
.XmlInvalidSubstitutionValueForField, value, field.GetDisplayName());
145
LogWarning(resourceNav,
DiagnosticId
.XmlMissingNameAttributeInResource);
152
LogWarning(resourceNav,
DiagnosticId
.XmlInvalidValueForAttributeActionForResource, action, name);
159
LogWarning(resourceNav,
DiagnosticId
.XmlCouldNotFindResourceToRemoveInAssembly, name, assembly.Name.Name);
Linker.Steps\CheckSuppressionsDispatcher.cs (4)
26
.Where(suppression => ((
DiagnosticId
)suppression.SuppressMessageInfo.Id).GetDiagnosticCategory() == DiagnosticCategory.Trimming)
27
.Where(suppression => ((
DiagnosticId
)suppression.SuppressMessageInfo.Id) !=
DiagnosticId
.RedundantSuppression)
34
context.LogWarning(new MessageOrigin(source),
DiagnosticId
.RedundantSuppression, $"IL{suppression.SuppressMessageInfo.Id:0000}");
Linker.Steps\DescriptorMarker.cs (5)
92
LogWarning(namespaceNav,
DiagnosticId
.XmlCouldNotFindAnyTypeInNamespace, fullname);
137
LogWarning(nav,
DiagnosticId
.TypeHasNoFieldsToPreserve, type.GetDisplayName());
141
LogWarning(nav,
DiagnosticId
.TypeHasNoMethodsToPreserve, type.GetDisplayName());
294
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindGetAccesorOfPropertyOnType, property.Name, type.FullName);
299
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindSetAccesorOfPropertyOnType, property.Name, type.FullName);
Linker.Steps\LinkAttributesParser.cs (17)
56
LogWarning(attributeNav,
DiagnosticId
.UnrecognizedInternalAttribute, internalAttribute);
61
LogWarning(attributeNav,
DiagnosticId
.XmlRemoveAttributeInstancesCanOnlyBeUsedOnType, nameof(RemoveAttributeInstancesAttribute));
74
LogWarning(attributeNav,
DiagnosticId
.XmlElementDoesNotContainRequiredAttributeFullname);
173
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindMatchingConstructorForCustomAttribute, attributeType.GetDisplayName());
223
LogWarning(propertyNav,
DiagnosticId
.XmlPropertyDoesNotContainAttributeName);
230
LogWarning(propertyNav,
DiagnosticId
.XmlCouldNotFindProperty, propertyName);
276
_context.LogError(null,
DiagnosticId
.CustomAttributeArgumentForTypeRequiresNestedNode, "System.Object", "argument");
320
_context.LogError(GetMessageOriginForPosition(nav),
DiagnosticId
.CouldNotResolveCustomAttributeTypeValue, svalue);
353
_context.LogError(GetMessageOriginForPosition(nav),
DiagnosticId
.UnexpectedAttributeArgumentType, typeref.GetDisplayName());
366
_context.LogError(GetMessageOriginForPosition(nav),
DiagnosticId
.UnexpectedAttributeArgumentType, typeref.GetDisplayName());
379
_context.LogError(GetMessageOriginForPosition(nav),
DiagnosticId
.TypeUsedWithAttributeValueCouldNotBeFound, typeName, nav.Value);
441
_context.LogError(null,
DiagnosticId
.CannotConverValueToType, value.ToString() ?? "", targetType.GetDisplayName());
461
LogWarning(nav,
DiagnosticId
.XmlCouldNotResolveAssemblyForAttribute, assemblyName, attributeFullName);
469
LogWarning(nav,
DiagnosticId
.XmlCouldNotResolveAssemblyForAttribute, assemblyName, attributeFullName);
479
LogWarning(nav,
DiagnosticId
.XmlAttributeTypeCouldNotBeFound, attributeFullName);
554
LogWarning(parameterNav,
DiagnosticId
.XmlMoreThanOneValueForParameterOfMethod, paramName, method.GetDisplayName());
581
LogWarning(returnNav,
DiagnosticId
.XmlMoreThanOneReturnElementForMethod, method.GetDisplayName());
Linker.Steps\MarkExportedTypesTargetStep.cs (1)
32
context.LogError(null,
DiagnosticId
.ExportedTypeCannotBeResolved, exportedType.Name);
Linker.Steps\MarkStep.cs (30)
960
Context.LogWarning(origin,
DiagnosticId
.UnresolvedAssemblyInDynamicDependencyAttribute, dynamicDependency.AssemblyName);
976
Context.LogWarning(origin,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, typeName);
987
Context.LogWarning(origin,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, typeReference.GetDisplayName());
996
Context.LogWarning(context,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, context.DeclaringType.GetDisplayName());
1007
Context.LogWarning(origin,
DiagnosticId
.NoMembersResolvedForMemberSignatureOrType, memberSignature, type.GetDisplayName());
1017
Context.LogWarning(origin,
DiagnosticId
.NoMembersResolvedForMemberSignatureOrType, memberTypes.ToString(), type.GetDisplayName());
1060
Context.LogWarning(context,
DiagnosticId
.DeprecatedPreserveDependencyAttribute);
1072
Context.LogWarning(context,
DiagnosticId
.CouldNotResolveDependencyAssembly, assemblyName);
1089
Context.LogWarning(context,
DiagnosticId
.CouldNotResolveDependencyType, typeName);
1134
Context.LogWarning(context,
DiagnosticId
.CouldNotResolveDependencyMember, member ?? "", td.GetDisplayName());
1810
Context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersMethodAccessedViaReflection, method.GetDisplayName());
1846
var
id = reportOnMember ?
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberWithRequiresUnreferencedCode :
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithRequiresUnreferencedCode;
1856
var
id = reportOnMember ?
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberWithDynamicallyAccessedMembers :
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithDynamicallyAccessedMembers;
1958
Context.LogWarning(origin,
DiagnosticId
.DynamicallyAccessedMembersFieldAccessedViaReflection, field.GetDisplayName());
2191
Context.LogWarning(origin,
DiagnosticId
.AttributeIsReferencedButTrimmerRemoveAllInstances, type.GetDisplayName());
3013
Context.LogWarning(type,
DiagnosticId
.TypeHasNoFieldsToPreserve, type.GetDisplayName());
3017
Context.LogWarning(type,
DiagnosticId
.TypeHasNoMethodsToPreserve, type.GetDisplayName());
3348
diagnosticContext.AddDiagnostic(
DiagnosticId
.RequiresUnreferencedCode, displayName, arg1, arg2);
3397
Context.LogWarning(methodOrigin,
DiagnosticId
.RequiresUnreferencedCodeOnStaticConstructor, method.GetDisplayName());
3399
Context.LogWarning(methodOrigin,
DiagnosticId
.RequiresUnreferencedCodeOnEntryPoint, method.GetDisplayName());
3601
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(origin,
DiagnosticId
.CannotStubConstructorWhenBaseTypeDoesNotHaveConstructor, method.DeclaringType.GetDisplayName()));
3618
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.CouldNotFindType, "System.NotSupportedException"));
3624
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.CouldNotFindConstructor, nse.GetDisplayName()));
3634
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.CouldNotFindConstructor, objectType.GetDisplayName()));
3644
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.CouldNotFindType, "System.Runtime.CompilerServices.DisablePrivateReflectionAttribute"));
3651
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.CouldNotFindConstructor, disablePrivateReflection.GetDisplayName()));
Linker.Steps\OutputStep.cs (1)
115
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.FailedToWriteOutput, outputName), e);
Linker.Steps\ProcessLinkerXmlBase.cs (14)
100
throw new LinkerFatalErrorException(MessageContainer.CreateErrorMessage(null,
DiagnosticId
.ErrorProcessingXmlLocation, _xmlDocumentLocation), ex);
125
LogWarning(assemblyNav,
DiagnosticId
.XmlUnsuportedWildcard);
136
LogWarning(assemblyNav,
DiagnosticId
.AssemblyWithEmbeddedXmlApplyToAnotherAssembly, _resource.Value.Assembly.Name.Name, name.ToString());
158
LogWarning(assemblyNav,
DiagnosticId
.XmlCouldNotResolveAssembly, name!.Name);
206
LogWarning(typeNav,
DiagnosticId
.XmlCouldNotResolveType, fullname);
286
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindFieldOnType, signature, type.GetDisplayName());
311
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindFieldOnType, name, type.GetDisplayName());
348
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindMethodOnType, signature, type.GetDisplayName());
373
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindMethodOnType, name, type.GetDisplayName());
400
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindEventOnType, signature, type.GetDisplayName());
422
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindEventOnType, name, type.GetDisplayName());
459
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindPropertyOnType, signature, type.GetDisplayName());
481
LogWarning(nav,
DiagnosticId
.XmlCouldNotFindPropertyOnType, name, type.GetDisplayName());
536
protected void LogWarning(XPathNavigator position,
DiagnosticId
id, params string[] args)
Linker.Steps\ProcessReferencesStep.cs (1)
43
Context.LogError(null,
DiagnosticId
.ReferenceAssemblyCouldNotBeLoaded, assemblyPath);
Linker.Steps\RootAssemblyInputStep.cs (4)
40
Context.LogError(null,
DiagnosticId
.RootAssemblyCannotUseAction, assembly.Name.ToString(), action.ToString());
50
Context.LogError(null,
DiagnosticId
.RootAssemblyDoesNotHaveEntryPoint, assembly.Name.ToString());
57
Context.LogError(null,
DiagnosticId
.MultipleEntryPointRoots, assembly.Name.ToString(), existingEntryPointAssembly.Name.ToString());
111
Context.LogError(null,
DiagnosticId
.RootAssemblyCouldNotBeFound, assemblyName);
Linker.Steps\ValidateVirtualMethodAnnotationsStep.cs (1)
63
Context.LogWarning(origin,
DiagnosticId
.RequiresUnreferencedCodeAttributeMismatch, message);
Linker\AssemblyResolver.cs (1)
146
_context.LogError(null,
DiagnosticId
.CouldNotFindAssemblyReference, reference.Name);
Linker\Driver.cs (32)
212
Context.LogError(null,
DiagnosticId
.MissingArgumentForCommanLineOptionName, optionName);
255
context.LogError(null,
DiagnosticId
.UnrecognizedCommandLineOption, token);
295
context.LogError(null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
312
context.LogError(null,
DiagnosticId
.InvalidDependenciesFileFormat);
390
context.LogError(null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
429
context.LogError(null,
DiagnosticId
.CustomDataFormatIsInvalid);
620
context.LogError(null,
DiagnosticId
.InvalidGenerateWarningSuppressionsValue, generateWarningSuppressionsArgument);
691
context.LogError(null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
713
context.LogError(null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
772
context.LogError(null,
DiagnosticId
.XmlDescriptorCouldNotBeFound, xmlFile);
837
context.LogError(null,
DiagnosticId
.UnrecognizedCommandLineOption, token);
843
context.LogError(null,
DiagnosticId
.NoFilesToLinkSpecified, resolvers);
849
context.LogError(null,
DiagnosticId
.NewMvidAndDeterministicCannotBeUsedAtSameTime);
871
context.LogError(null,
DiagnosticId
.InvalidDependenciesFileFormat);
1000
Context.LogError(null,
DiagnosticId
.FailedToResolveMetadataElement, re.Message);
1003
Context.LogError(null,
DiagnosticId
.LinkerUnexpectedError);
1050
Context.LogError(null,
DiagnosticId
.AssemblyInCustomStepOptionCouldNotBeFound, arg);
1053
Context.LogError(null,
DiagnosticId
.AssemblyPathInCustomStepMustBeFullyQualified, arg);
1128
Context.LogError(null,
DiagnosticId
.InvalidArgForCustomStep, arg);
1135
Context.LogError(null,
DiagnosticId
.ExpectedSignToControlNewStepInsertion);
1160
Context.LogError(null,
DiagnosticId
.PipelineStepCouldNotBeFound, targetName);
1185
Context.LogError(null,
DiagnosticId
.PipelineStepCouldNotBeFound, targetName);
1197
Context.LogError(null,
DiagnosticId
.CustomStepTypeIsIncompatibleWithLinkerVersion, stepType.ToString());
1234
Context.LogError(null,
DiagnosticId
.CustomStepTypeCouldNotBeFound, type);
1250
Context.LogError(null,
DiagnosticId
.CustomStepTypeCouldNotBeFound, type);
1256
Context.LogError(null,
DiagnosticId
.CustomStepTypeIsIncompatibleWithLinkerVersion, type);
1308
Context.LogError(null,
DiagnosticId
.InvalidAssemblyAction, s);
1326
Context.LogError(null,
DiagnosticId
.InvalidAssemblyRootMode, s);
1339
Context.LogError(null,
DiagnosticId
.InvalidWarningVersion, text);
1374
Context.LogError(null,
DiagnosticId
.InvalidOptimizationValue, text);
1394
Context.LogError(null,
DiagnosticId
.InvalidMetadataOption, text);
1441
Context.LogError(null,
DiagnosticId
.InvalidArgumentForTokenOption, token);
Linker\DynamicDependency.cs (1)
80
context.LogWarning(member,
DiagnosticId
.DynamicDependencyAttributeCouldNotBeAnalyzed);
Linker\EmbeddedXmlInfo.cs (3)
43
context.LogError(null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString());
66
context.LogError(null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString());
94
context.LogError(null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString());
Linker\FeatureSettings.cs (3)
21
context.LogError(null,
DiagnosticId
.XmlFeatureDoesNotSpecifyFeatureValue, documentLocation, feature);
27
context.LogError(null,
DiagnosticId
.XmlUnsupportedNonBooleanValueForFeature, documentLocation, feature);
35
context.LogError(null,
DiagnosticId
.XmlDocumentLocationHasInvalidFeatureDefault, documentLocation);
Linker\LinkContext.cs (10)
500
LogWarning(GetAssemblyLocation(assembly),
DiagnosticId
.InvalidIsTrimmableValue, args[1].Value.ToString() ?? "", assembly.Name.Name);
652
public void LogWarning(MessageOrigin origin,
DiagnosticId
id, params string[] args)
682
internal void LogWarning(IMemberDefinition origin,
DiagnosticId
id, int ilOffset = MessageOrigin.UnsetILOffset, params string[] args)
696
public void LogWarning(IMemberDefinition origin,
DiagnosticId
id, params string[] args)
725
public void LogWarning(string origin,
DiagnosticId
id, params string[] args)
750
public void LogError(MessageOrigin? origin,
DiagnosticId
id, params string[] args)
1081
LogError(string.Format(SharedStrings.FailedToResolveFieldElementMessage, fieldReference.FullName), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1087
LogError(string.Format(SharedStrings.FailedToResolveMethodElementMessage, methodReference.GetDisplayName()), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1093
LogError(string.Format(SharedStrings.FailedToResolveTypeElementMessage, typeReference.GetDisplayName()), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1099
LogError(string.Format(SharedStrings.FailedToResolveTypeElementMessage, et.Name), (int)
DiagnosticId
.FailedToResolveMetadataElement);
Linker\LinkerAttributesInformation.cs (2)
87
context.LogWarning(provider,
DiagnosticId
.AttributeShouldOnlyBeUsedOnceOnMember, attributeValueType.FullName ?? "", (provider is MemberReference memberRef) ? memberRef.GetDisplayName() : provider.FullName);
147
context.LogWarning((IMemberDefinition)provider,
DiagnosticId
.AttributeDoesntHaveTheRequiredNumberOfParameters, typeof(RequiresUnreferencedCodeAttribute).FullName ?? "");
Linker\MessageContainer.cs (5)
66
internal static MessageContainer CreateErrorMessage(MessageOrigin? origin,
DiagnosticId
id, params string[] args)
127
internal static MessageContainer CreateWarningMessage(LinkContext context, MessageOrigin origin,
DiagnosticId
id, WarnVersion version, params string[] args)
180
private static MessageContainer CreateWarningMessageContainer(LinkContext context, MessageOrigin origin,
DiagnosticId
id, WarnVersion version, string subcategory, params string[] args)
243
context.LogWarning(context.GetAssemblyLocation(assembly),
DiagnosticId
.AssemblyProducedTrimWarnings, assemblyName);
282
private MessageContainer(MessageCategory category,
DiagnosticId
id, string subcategory = MessageSubCategory.None, MessageOrigin? origin = null, params string[] args)
Linker\TypeNameResolver.WithDiagnostics.cs (1)
34
diagnosticContext.AddDiagnostic(
DiagnosticId
.TypeNameIsNotAssemblyQualified, typeNameString);
Linker\UnconditionalSuppressMessageAttributeState.cs (1)
347
_context.LogWarning(_context.GetAssemblyLocation(module.Assembly),
DiagnosticId
.InvalidScopeInUnconditionalSuppressMessage, info.Scope ?? "", module.Name, info.Target ?? "");
src\runtime\src\tools\illink\src\ILLink.Shared\Annotations.cs (32)
87
public static (
DiagnosticId
Id, string[] Arguments) GetDiagnosticForAnnotationMismatch(ValueWithDynamicallyAccessedMembers source, ValueWithDynamicallyAccessedMembers target, string missingAnnotations)
100
DiagnosticId
diagnosticId = (source, target) switch
102
(MethodParameterValue maybeThisSource, MethodParameterValue maybeThisTarget) when maybeThisSource.IsThisParameter() && maybeThisTarget.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsThisParameter,
103
(MethodParameterValue maybeThis, MethodParameterValue) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsParameter,
104
(MethodParameterValue maybeThis, MethodReturnValue) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsMethodReturnType,
105
(MethodParameterValue maybeThis, FieldValue) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsField,
106
(MethodParameterValue maybeThis, GenericParameterValue) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsGenericParameter,
107
(MethodParameterValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsThisParameter,
108
(MethodParameterValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsParameter,
109
(MethodParameterValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsMethodReturnType,
110
(MethodParameterValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsField,
111
(MethodParameterValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsGenericParameter,
112
(MethodReturnValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsThisParameter,
113
(MethodReturnValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsParameter,
114
(MethodReturnValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsMethodReturnType,
115
(MethodReturnValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsField,
116
(MethodReturnValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsGenericParameter,
117
(FieldValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsThisParameter,
118
(FieldValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsParameter,
119
(FieldValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsMethodReturnType,
120
(FieldValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsField,
121
(FieldValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsGenericParameter,
122
(GenericParameterValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsThisParameter,
123
(GenericParameterValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsParameter,
124
(GenericParameterValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsMethodReturnType,
125
(GenericParameterValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsField,
126
(GenericParameterValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter,
127
(NullableValueWithDynamicallyAccessedMembers, MethodParameterValue maybeThis) when maybeThis.IsThisParameter() =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsThisParameter,
128
(NullableValueWithDynamicallyAccessedMembers, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsParameter,
129
(NullableValueWithDynamicallyAccessedMembers, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsMethodReturnType,
130
(NullableValueWithDynamicallyAccessedMembers, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsField,
131
(NullableValueWithDynamicallyAccessedMembers, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter,
src\runtime\src\tools\illink\src\ILLink.Shared\DiagnosticId.cs (5)
230
public static string AsString(this
DiagnosticId
diagnosticId) => $"IL{(int)diagnosticId}";
232
public static string GetDiagnosticSubcategory(this
DiagnosticId
diagnosticId) =>
247
>= 2109 and < (int)
DiagnosticId
._EndTrimAnalysisWarningsSentinel => MessageSubCategory.TrimAnalysis,
253
public static string GetDiagnosticCategory(this
DiagnosticId
diagnosticId) =>
263
public static string? GetHelpUri(this
DiagnosticId
diagnosticId) =>
src\runtime\src\tools\illink\src\ILLink.Shared\DiagnosticString.cs (1)
16
public DiagnosticString(
DiagnosticId
diagnosticId)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\DiagnosticContext.cs (2)
22
public partial void AddDiagnostic(
DiagnosticId
id, params string[] args);
28
public partial void AddDiagnostic(
DiagnosticId
id, ValueWithDynamicallyAccessedMembers actualValue, ValueWithDynamicallyAccessedMembers expectedAnnotationsValue, params string[] args);
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 (7)
56
(
var
diagnosticId, var diagnosticArguments) = Annotations.GetDiagnosticForAnnotationMismatch(valueWithDynamicallyAccessedMembers, targetValue, missingMemberTypes);
86
DiagnosticId
diagnosticId = targetValue switch
88
MethodParameterValue maybeThis when maybeThis.IsThisParameter() =>
DiagnosticId
.ImplicitThisCannotBeStaticallyDetermined,
89
MethodParameterValue =>
DiagnosticId
.MethodParameterCannotBeStaticallyDetermined,
90
MethodReturnValue =>
DiagnosticId
.MethodReturnValueCannotBeStaticallyDetermined,
91
FieldValue =>
DiagnosticId
.FieldValueCannotBeStaticallyDetermined,
92
GenericParameterValue =>
DiagnosticId
.TypePassedToGenericParameterCannotBeStaticallyDetermined,