237 references to DiagnosticId
illink (237)
Linker.Dataflow\CompilerGeneratedState.cs (7)
132
List<(MessageOrigin,
DiagnosticId
, string[])>? _warnings = null;
137
void AddWarning (MessageOrigin origin,
DiagnosticId
id, params string[] messageArgs)
139
_warnings ??= new List<(MessageOrigin,
DiagnosticId
, string[])> ();
177
AddWarning (new MessageOrigin (method),
DiagnosticId
.MethodsAreAssociatedWithUserMethod, method.GetDisplayName (), alreadyAssociatedMethod.GetDisplayName (), generatedType.GetDisplayName ());
228
AddWarning (new MessageOrigin (method),
DiagnosticId
.MethodsAreAssociatedWithStateMachine, method.GetDisplayName (), alreadyAssociatedMethod.GetDisplayName (), stateMachineType.GetDisplayName ());
279
AddWarning (new MessageOrigin (userDefinedMethod),
DiagnosticId
.MethodsAreAssociatedWithUserMethod, userDefinedMethod.GetDisplayName (), alreadyAssociatedMethod.GetDisplayName (), nestedFunction.GetDisplayName ());
306
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)
208
_context.LogWarning (member,
DiagnosticId
.AttributeDoesntHaveTheRequiredNumberOfParameters, "System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute");
230
_context.LogWarning (field,
DiagnosticId
.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings, field.GetDisplayName ());
248
_context.LogWarning (method,
DiagnosticId
.DynamicallyAccessedMembersIsNotAllowedOnMethods);
258
_context.LogWarning (method,
DiagnosticId
.DynamicallyAccessedMembersIsNotAllowedOnMethods);
260
_context.LogWarning (method,
DiagnosticId
.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings,
271
_context.LogWarning (method,
DiagnosticId
.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings, method.GetDisplayName ());
313
_context.LogWarning (property,
DiagnosticId
.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings, property.GetDisplayName ());
340
_context.LogWarning (setMethod,
DiagnosticId
.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName (), setMethod.GetDisplayName ());
378
_context.LogWarning (getMethod,
DiagnosticId
.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName (), getMethod.GetDisplayName ());
390
_context.LogWarning (property,
DiagnosticId
.DynamicallyAccessedMembersCouldNotFindBackingField, property.GetDisplayName ());
398
_context.LogWarning (backingField,
DiagnosticId
.DynamicallyAccessedMembersOnPropertyConflictsWithBackingField, property.GetDisplayName (), backingField.GetDisplayName ());
570
_context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides,
575
_context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides,
580
_context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnImplicitThisBetweenOverrides,
585
_context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersMismatchOnGenericParameterBetweenOverrides,
Linker.Dataflow\HandleCallAction.cs (2)
60
_diagnosticContext.AddDiagnostic (
DiagnosticId
.CorrectnessOfCOMCannotBeGuaranteed, calledMethod.GetDisplayName ());
241
_diagnosticContext.AddDiagnostic (
DiagnosticId
.UnresolvedAssemblyInCreateInstance,
Linker.Dataflow\MethodBodyScanner.cs (2)
191
(int)
DiagnosticId
.LinkerUnexpectedError,
887
(int)
DiagnosticId
.LinkerUnexpectedError,
Linker.Steps\BodySubstitutionParser.cs (10)
60
LogWarning (methodNav,
DiagnosticId
.XmlCouldNotFindMethodOnType, signature, type.GetDisplayName ());
73
LogWarning (methodNav,
DiagnosticId
.XmlInvalidValueForStub, method.GetDisplayName ());
83
LogWarning (methodNav,
DiagnosticId
.XmlUnkownBodyModification, action, method.GetDisplayName ());
97
LogWarning (fieldNav,
DiagnosticId
.XmlCouldNotFindFieldOnType, name, type.GetDisplayName ());
102
LogWarning (fieldNav,
DiagnosticId
.XmlSubstitutedFieldNeedsToBeStatic, field.GetDisplayName ());
108
LogWarning (fieldNav,
DiagnosticId
.XmlMissingSubstitutionValueForField, field.GetDisplayName ());
112
LogWarning (fieldNav,
DiagnosticId
.XmlInvalidSubstitutionValueForField, value, field.GetDisplayName ());
132
LogWarning (resourceNav,
DiagnosticId
.XmlMissingNameAttributeInResource);
138
LogWarning (resourceNav,
DiagnosticId
.XmlInvalidValueForAttributeActionForResource, action, name);
144
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)
33
context.LogWarning (new MessageOrigin (source),
DiagnosticId
.RedundantSuppression, $"IL{suppression.SuppressMessageInfo.Id:0000}");
Linker.Steps\DescriptorMarker.cs (5)
86
LogWarning (namespaceNav,
DiagnosticId
.XmlCouldNotFindAnyTypeInNamespace, fullname);
128
LogWarning (nav,
DiagnosticId
.TypeHasNoFieldsToPreserve, type.GetDisplayName ());
132
LogWarning (nav,
DiagnosticId
.TypeHasNoMethodsToPreserve, type.GetDisplayName ());
262
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindGetAccesorOfPropertyOnType, property.Name, type.FullName);
267
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindSetAccesorOfPropertyOnType, property.Name, type.FullName);
Linker.Steps\LinkAttributesParser.cs (17)
53
LogWarning (attributeNav,
DiagnosticId
.UnrecognizedInternalAttribute, internalAttribute);
57
LogWarning (attributeNav,
DiagnosticId
.XmlRemoveAttributeInstancesCanOnlyBeUsedOnType, nameof (RemoveAttributeInstancesAttribute));
67
LogWarning (attributeNav,
DiagnosticId
.XmlElementDoesNotContainRequiredAttributeFullname);
162
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindMatchingConstructorForCustomAttribute, attributeType.GetDisplayName ());
208
LogWarning (propertyNav,
DiagnosticId
.XmlPropertyDoesNotContainAttributeName);
214
LogWarning (propertyNav,
DiagnosticId
.XmlCouldNotFindProperty, propertyName);
257
_context.LogError (null,
DiagnosticId
.CustomAttributeArgumentForTypeRequiresNestedNode, "System.Object", "argument");
300
_context.LogError (GetMessageOriginForPosition (nav),
DiagnosticId
.CouldNotResolveCustomAttributeTypeValue, svalue);
326
_context.LogError (GetMessageOriginForPosition (nav),
DiagnosticId
.UnexpectedAttributeArgumentType, typeref.GetDisplayName ());
337
_context.LogError (GetMessageOriginForPosition (nav),
DiagnosticId
.UnexpectedAttributeArgumentType, typeref.GetDisplayName ());
349
_context.LogError (GetMessageOriginForPosition (nav),
DiagnosticId
.TypeUsedWithAttributeValueCouldNotBeFound, typeName, nav.Value);
407
_context.LogError (null,
DiagnosticId
.CannotConverValueToType, value.ToString () ?? "", targetType.GetDisplayName ());
422
LogWarning (nav,
DiagnosticId
.XmlCouldNotResolveAssemblyForAttribute, assemblyName, attributeFullName);
428
LogWarning (nav,
DiagnosticId
.XmlCouldNotResolveAssemblyForAttribute, assemblyName, attributeFullName);
437
LogWarning (nav,
DiagnosticId
.XmlAttributeTypeCouldNotBeFound, attributeFullName);
504
LogWarning (parameterNav,
DiagnosticId
.XmlMoreThanOneValueForParameterOfMethod, paramName, method.GetDisplayName ());
526
LogWarning (returnNav,
DiagnosticId
.XmlMoreThanOneReturnElementForMethod, method.GetDisplayName ());
Linker.Steps\MarkExportedTypesTargetStep.cs (1)
31
context.LogError (null,
DiagnosticId
.ExportedTypeCannotBeResolved, exportedType.Name);
Linker.Steps\MarkStep.cs (31)
860
Context.LogWarning (origin,
DiagnosticId
.UnresolvedAssemblyInDynamicDependencyAttribute, dynamicDependency.AssemblyName);
872
Context.LogWarning (origin,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, typeName);
880
Context.LogWarning (origin,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, typeReference.GetDisplayName ());
886
Context.LogWarning (context,
DiagnosticId
.UnresolvedTypeInDynamicDependencyAttribute, context.DeclaringType.GetDisplayName ());
895
Context.LogWarning (origin,
DiagnosticId
.NoMembersResolvedForMemberSignatureOrType, memberSignature, type.GetDisplayName ());
902
Context.LogWarning (origin,
DiagnosticId
.NoMembersResolvedForMemberSignatureOrType, memberTypes.ToString (), type.GetDisplayName ());
943
Context.LogWarning (context,
DiagnosticId
.DeprecatedPreserveDependencyAttribute);
953
Context.LogWarning (context,
DiagnosticId
.CouldNotResolveDependencyAssembly, assemblyName);
966
Context.LogWarning (context,
DiagnosticId
.CouldNotResolveDependencyType, typeName);
1003
Context.LogWarning (context,
DiagnosticId
.CouldNotResolveDependencyMember, member ?? "", td.GetDisplayName ());
1613
Context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersMethodAccessedViaReflection, method.GetDisplayName ());
1647
var
id = reportOnMember ?
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberWithRequiresUnreferencedCode :
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithRequiresUnreferencedCode;
1656
var
id = reportOnMember ?
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberWithDynamicallyAccessedMembers :
DiagnosticId
.DynamicallyAccessedMembersOnTypeReferencesMemberOnBaseWithDynamicallyAccessedMembers;
1754
Context.LogWarning (origin,
DiagnosticId
.DynamicallyAccessedMembersFieldAccessedViaReflection, field.GetDisplayName ());
1938
Context.LogWarning (origin,
DiagnosticId
.AttributeIsReferencedButTrimmerRemoveAllInstances, type.GetDisplayName ());
1970
Context.LogWarning (typeOrigin,
DiagnosticId
.RequiresUnreferencedCodeOnBaseClass, type.GetDisplayName (), type.BaseType.GetDisplayName (), arg1, arg2);
2723
Context.LogWarning (type,
DiagnosticId
.TypeHasNoFieldsToPreserve, type.GetDisplayName ());
2727
Context.LogWarning (type,
DiagnosticId
.TypeHasNoMethodsToPreserve, type.GetDisplayName ());
3045
diagnosticContext.AddDiagnostic (
DiagnosticId
.RequiresUnreferencedCode, displayName, arg1, arg2);
3091
Context.LogWarning (methodOrigin,
DiagnosticId
.RequiresUnreferencedCodeOnStaticConstructor, method.GetDisplayName ());
3093
Context.LogWarning (methodOrigin,
DiagnosticId
.RequiresUnreferencedCodeOnEntryPoint, method.GetDisplayName ());
3274
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (origin,
DiagnosticId
.CannotStubConstructorWhenBaseTypeDoesNotHaveConstructor, method.DeclaringType.GetDisplayName ()));
3291
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.CouldNotFindType, "System.NotSupportedException"));
3297
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.CouldNotFindConstructor, nse.GetDisplayName ()));
3307
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.CouldNotFindConstructor, objectType.GetDisplayName ()));
3317
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.CouldNotFindType, "System.Runtime.CompilerServices.DisablePrivateReflectionAttribute"));
3324
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.CouldNotFindConstructor, disablePrivateReflection.GetDisplayName ()));
Linker.Steps\OutputStep.cs (1)
107
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.FailedToWriteOutput, outputName), e);
Linker.Steps\ProcessLinkerXmlBase.cs (14)
95
throw new LinkerFatalErrorException (MessageContainer.CreateErrorMessage (null,
DiagnosticId
.ErrorProcessingXmlLocation, _xmlDocumentLocation), ex);
118
LogWarning (assemblyNav,
DiagnosticId
.XmlUnsuportedWildcard);
127
LogWarning (assemblyNav,
DiagnosticId
.AssemblyWithEmbeddedXmlApplyToAnotherAssembly, _resource.Value.Assembly.Name.Name, name.ToString ());
145
LogWarning (assemblyNav,
DiagnosticId
.XmlCouldNotResolveAssembly, name!.Name);
186
LogWarning (typeNav,
DiagnosticId
.XmlCouldNotResolveType, fullname);
257
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindFieldOnType, signature, type.GetDisplayName ());
277
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindFieldOnType, name, type.GetDisplayName ());
311
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindMethodOnType, signature, type.GetDisplayName ());
331
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindMethodOnType, name, type.GetDisplayName ());
355
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindEventOnType, signature, type.GetDisplayName ());
373
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindEventOnType, name, type.GetDisplayName ());
407
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindPropertyOnType, signature, type.GetDisplayName ());
425
LogWarning (nav,
DiagnosticId
.XmlCouldNotFindPropertyOnType, name, type.GetDisplayName ());
480
protected void LogWarning (XPathNavigator position,
DiagnosticId
id, params string[] args)
Linker.Steps\ProcessReferencesStep.cs (1)
41
Context.LogError (null,
DiagnosticId
.ReferenceAssemblyCouldNotBeLoaded, assemblyPath);
Linker.Steps\RootAssemblyInputStep.cs (3)
40
Context.LogError (null,
DiagnosticId
.RootAssemblyCannotUseAction, assembly.Name.ToString (), action.ToString ());
48
Context.LogError (null,
DiagnosticId
.RootAssemblyDoesNotHaveEntryPoint, assembly.Name.ToString ());
112
Context.LogError (null,
DiagnosticId
.RootAssemblyCouldNotBeFound, fileName);
Linker.Steps\ValidateVirtualMethodAnnotationsStep.cs (1)
57
Context.LogWarning (origin,
DiagnosticId
.RequiresUnreferencedCodeAttributeMismatch, message);
Linker\AssemblyResolver.cs (1)
139
_context.LogError (null,
DiagnosticId
.CouldNotFindAssemblyReference, reference.Name);
Linker\Driver.cs (33)
174
Context.LogError (null,
DiagnosticId
.MissingArgumentForCommanLineOptionName, optionName);
211
context.LogError (null,
DiagnosticId
.UnrecognizedCommandLineOption, token);
246
context.LogError (null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
262
context.LogError (null,
DiagnosticId
.InvalidDependenciesFileFormat);
336
context.LogError (null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
371
context.LogError (null,
DiagnosticId
.CustomDataFormatIsInvalid);
530
context.LogError (null,
DiagnosticId
.InvalidGenerateWarningSuppressionsValue, generateWarningSuppressionsArgument);
591
context.LogError (null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
608
context.LogError (null,
DiagnosticId
.InvalidAssemblyName, assemblyName);
661
context.LogError (null,
DiagnosticId
.XmlDescriptorCouldNotBeFound, xmlFile);
673
context.LogError (null,
DiagnosticId
.RootAssemblyCouldNotBeFound, assemblyFile);
721
context.LogError (null,
DiagnosticId
.UnrecognizedCommandLineOption, token);
726
context.LogError (null,
DiagnosticId
.NoFilesToLinkSpecified, resolvers);
731
context.LogError (null,
DiagnosticId
.NewMvidAndDeterministicCannotBeUsedAtSameTime);
750
context.LogError (null,
DiagnosticId
.InvalidDependenciesFileFormat);
868
Context.LogError (null,
DiagnosticId
.FailedToResolveMetadataElement, re.Message);
871
Context.LogError (null,
DiagnosticId
.LinkerUnexpectedError);
913
Context.LogError (null,
DiagnosticId
.AssemblyInCustomStepOptionCouldNotBeFound, arg);
915
Context.LogError (null,
DiagnosticId
.AssemblyPathInCustomStepMustBeFullyQualified, arg);
986
Context.LogError (null,
DiagnosticId
.InvalidArgForCustomStep, arg);
992
Context.LogError (null,
DiagnosticId
.ExpectedSignToControlNewStepInsertion);
1014
Context.LogError (null,
DiagnosticId
.PipelineStepCouldNotBeFound, targetName);
1036
Context.LogError (null,
DiagnosticId
.PipelineStepCouldNotBeFound, targetName);
1048
Context.LogError (null,
DiagnosticId
.CustomStepTypeIsIncompatibleWithLinkerVersion, stepType.ToString ());
1082
Context.LogError (null,
DiagnosticId
.CustomStepTypeCouldNotBeFound, type);
1097
Context.LogError (null,
DiagnosticId
.CustomStepTypeCouldNotBeFound, type);
1102
Context.LogError (null,
DiagnosticId
.CustomStepTypeIsIncompatibleWithLinkerVersion, type);
1149
Context.LogError (null,
DiagnosticId
.InvalidAssemblyAction, s);
1166
Context.LogError (null,
DiagnosticId
.InvalidAssemblyRootMode, s);
1178
Context.LogError (null,
DiagnosticId
.InvalidWarningVersion, text);
1212
Context.LogError (null,
DiagnosticId
.InvalidOptimizationValue, text);
1231
Context.LogError (null,
DiagnosticId
.InvalidMetadataOption, text);
1272
Context.LogError (null,
DiagnosticId
.InvalidArgumentForTokenOption, token);
Linker\DynamicDependency.cs (1)
80
context.LogWarning (member,
DiagnosticId
.DynamicDependencyAttributeCouldNotBeAnalyzed);
Linker\EmbeddedXmlInfo.cs (3)
40
context.LogError (null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString ());
60
context.LogError (null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString ());
85
context.LogError (null,
DiagnosticId
.XmlException, rsc.Name, ex.ToString ());
Linker\FeatureSettings.cs (3)
20
context.LogError (null,
DiagnosticId
.XmlFeatureDoesNotSpecifyFeatureValue, documentLocation, feature);
25
context.LogError (null,
DiagnosticId
.XmlUnsupportedNonBooleanValueForFeature, documentLocation, feature);
32
context.LogError (null,
DiagnosticId
.XmlDocumentLocationHasInvalidFeatureDefault, documentLocation);
Linker\LinkContext.cs (10)
443
LogWarning (GetAssemblyLocation (assembly),
DiagnosticId
.InvalidIsTrimmableValue, args[1].Value.ToString () ?? "", assembly.Name.Name);
593
public void LogWarning (MessageOrigin origin,
DiagnosticId
id, params string[] args)
623
internal void LogWarning (IMemberDefinition origin,
DiagnosticId
id, int ilOffset = MessageOrigin.UnsetILOffset, params string[] args)
637
public void LogWarning (IMemberDefinition origin,
DiagnosticId
id, params string[] args)
666
public void LogWarning (string origin,
DiagnosticId
id, params string[] args)
691
public void LogError (MessageOrigin? origin,
DiagnosticId
id, params string[] args)
1010
LogError (string.Format (SharedStrings.FailedToResolveFieldElementMessage, fieldReference.FullName), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1016
LogError (string.Format (SharedStrings.FailedToResolveMethodElementMessage, methodReference.GetDisplayName ()), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1022
LogError (string.Format (SharedStrings.FailedToResolveTypeElementMessage, typeReference.GetDisplayName ()), (int)
DiagnosticId
.FailedToResolveMetadataElement);
1028
LogError (string.Format (SharedStrings.FailedToResolveTypeElementMessage, et.Name), (int)
DiagnosticId
.FailedToResolveMetadataElement);
Linker\LinkerAttributesInformation.cs (2)
80
context.LogWarning (provider,
DiagnosticId
.AttributeShouldOnlyBeUsedOnceOnMember, attributeValueType.FullName ?? "", (provider is MemberReference memberRef) ? memberRef.GetDisplayName () : provider.FullName);
128
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)
241
context.LogWarning (context.GetAssemblyLocation (assembly),
DiagnosticId
.AssemblyProducedTrimWarnings, assemblyName);
280
private MessageContainer (MessageCategory category,
DiagnosticId
id, string subcategory = MessageSubCategory.None, MessageOrigin? origin = null, params string[] args)
Linker\TypeNameResolver.WithDiagnostics.cs (1)
33
diagnosticContext.AddDiagnostic (
DiagnosticId
.TypeNameIsNotAssemblyQualified, typeNameString);
Linker\UnconditionalSuppressMessageAttributeState.cs (1)
318
_context.LogWarning (_context.GetAssemblyLocation (module.Assembly),
DiagnosticId
.InvalidScopeInUnconditionalSuppressMessage, info.Scope ?? "", module.Name, info.Target ?? "");
src\tools\illink\src\ILLink.Shared\Annotations.cs (32)
86
public static (
DiagnosticId
Id, string[] Arguments) GetDiagnosticForAnnotationMismatch (ValueWithDynamicallyAccessedMembers source, ValueWithDynamicallyAccessedMembers target, string missingAnnotations)
97
DiagnosticId
diagnosticId = (source, target) switch {
98
(MethodParameterValue maybeThisSource, MethodParameterValue maybeThisTarget) when maybeThisSource.IsThisParameter () && maybeThisTarget.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsThisParameter,
99
(MethodParameterValue maybeThis, MethodParameterValue) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsParameter,
100
(MethodParameterValue maybeThis, MethodReturnValue) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsMethodReturnType,
101
(MethodParameterValue maybeThis, FieldValue) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsField,
102
(MethodParameterValue maybeThis, GenericParameterValue) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchThisParameterTargetsGenericParameter,
103
(MethodParameterValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsThisParameter,
104
(MethodParameterValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsParameter,
105
(MethodParameterValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsMethodReturnType,
106
(MethodParameterValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsField,
107
(MethodParameterValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchParameterTargetsGenericParameter,
108
(MethodReturnValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsThisParameter,
109
(MethodReturnValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsParameter,
110
(MethodReturnValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsMethodReturnType,
111
(MethodReturnValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsField,
112
(MethodReturnValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchMethodReturnTypeTargetsGenericParameter,
113
(FieldValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsThisParameter,
114
(FieldValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsParameter,
115
(FieldValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsMethodReturnType,
116
(FieldValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsField,
117
(FieldValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchFieldTargetsGenericParameter,
118
(GenericParameterValue, MethodParameterValue maybeThis) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsThisParameter,
119
(GenericParameterValue, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsParameter,
120
(GenericParameterValue, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsMethodReturnType,
121
(GenericParameterValue, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsField,
122
(GenericParameterValue, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter,
123
(NullableValueWithDynamicallyAccessedMembers, MethodParameterValue maybeThis) when maybeThis.IsThisParameter () =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsThisParameter,
124
(NullableValueWithDynamicallyAccessedMembers, MethodParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsParameter,
125
(NullableValueWithDynamicallyAccessedMembers, MethodReturnValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsMethodReturnType,
126
(NullableValueWithDynamicallyAccessedMembers, FieldValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsField,
127
(NullableValueWithDynamicallyAccessedMembers, GenericParameterValue) =>
DiagnosticId
.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter,
src\tools\illink\src\ILLink.Shared\DiagnosticId.cs (6)
219
public static string AsString (this
DiagnosticId
diagnosticId) => $"IL{(int) diagnosticId}";
221
public static string GetDiagnosticSubcategory (this
DiagnosticId
diagnosticId) =>
235
>= 2109 and < (int)
DiagnosticId
._EndTrimAnalysisWarningsSentinel => MessageSubCategory.TrimAnalysis,
237
>= 3054 and < (int)
DiagnosticId
._EndAotAnalysisWarningsSentinel => MessageSubCategory.AotAnalysis,
241
public static string GetDiagnosticCategory (this
DiagnosticId
diagnosticId) =>
249
public static string? GetHelpUri(this
DiagnosticId
diagnosticId) =>
src\tools\illink\src\ILLink.Shared\DiagnosticString.cs (1)
16
public DiagnosticString (
DiagnosticId
diagnosticId)
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\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (13)
329
_diagnosticContext.AddDiagnostic (
DiagnosticId
.UnrecognizedTypeInRuntimeHelpersRunClassConstructor, calledMethod.GetDisplayName ());
730
_diagnosticContext.AddDiagnostic (
DiagnosticId
.PropertyAccessorParameterInLinqExpressionsCannotBeStaticallyDetermined,
803
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericMethod, calledMethod.GetDisplayName ());
813
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericMethod, calledMethod.GetDisplayName ());
866
_diagnosticContext.AddDiagnostic (
DiagnosticId
.CaseInsensitiveTypeGetTypeCallIsNotSupported, calledMethod.GetDisplayName ());
887
_diagnosticContext.AddDiagnostic (
DiagnosticId
.UnrecognizedTypeNameInTypeGetType, calledMethod.GetDisplayName ());
954
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericType, calledMethod.GetDisplayName ());
962
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericType, calledMethod.GetDisplayName ());
1120
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericMethod, calledMethod.GetDisplayName ());
1259
_diagnosticContext.AddDiagnostic (
DiagnosticId
.ParametersOfAssemblyCreateInstanceCannotBeAnalyzed, calledMethod.GetDisplayName ());
1381
_diagnosticContext.AddDiagnostic (
DiagnosticId
.MakeGenericMethod, reflectionMethod.GetDisplayName ());
1433
_diagnosticContext.AddDiagnostic (
DiagnosticId
.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy (calledMethod, (ParameterIndex) 1 + offset).GetDisplayName (), calledMethod.GetDisplayName ());
1437
_diagnosticContext.AddDiagnostic (
DiagnosticId
.UnrecognizedParameterInMethodCreateInstance, new ParameterProxy (calledMethod, (ParameterIndex) 0 + offset).GetDisplayName (), calledMethod.GetDisplayName ());
src\tools\illink\src\ILLink.Shared\TrimAnalysis\RequireDynamicallyAccessedMembersAction.cs (7)
41
(
var
diagnosticId, var diagnosticArguments) = Annotations.GetDiagnosticForAnnotationMismatch (valueWithDynamicallyAccessedMembers, targetValue, missingMemberTypes);
58
DiagnosticId
diagnosticId = targetValue switch {
59
MethodParameterValue maybeThis when maybeThis.IsThisParameter () =>
DiagnosticId
.ImplicitThisCannotBeStaticallyDetermined,
60
MethodParameterValue =>
DiagnosticId
.MethodParameterCannotBeStaticallyDetermined,
61
MethodReturnValue =>
DiagnosticId
.MethodReturnValueCannotBeStaticallyDetermined,
62
FieldValue =>
DiagnosticId
.FieldValueCannotBeStaticallyDetermined,
63
GenericParameterValue =>
DiagnosticId
.TypePassedToGenericParameterCannotBeStaticallyDetermined,