178 instantiations of CSDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (178)
Binder\Binder.cs (7)
541diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code), syntax.Location)); 546diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), syntax.Location)); 551diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code), token.GetLocation())); 556diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), token.GetLocation())); 575diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code), location)); 580diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), location)); 763: new CSDiagnosticInfo(isDelegateConversion
Binder\Binder_Await.cs (6)
161info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitInStaticVariableInitializer); 179new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitInQuery) : 180new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncLambda, ((LambdaSymbol)method).MessageID.Localize()); 185new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutVoidAsyncMethod) : 186new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsyncMethod, method.ReturnType); 193info = new CSDiagnosticInfo(ErrorCode.ERR_BadAwaitWithoutAsync);
Binder\Binder_Expressions.cs (12)
2271diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_FieldInitRefNonstatic, member); 2276diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_ObjectRequired, member); 2288diagnosticInfoOpt = new CSDiagnosticInfo(ErrorCode.ERR_ObjectRequired, member); 2499return new CSDiagnosticInfo(ErrorCode.ERR_ThisStructNotInAnonMeth); 7295diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 1, 1))); 7299diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.Create(node.SyntaxTree, new TextSpan(token.Span.End - 2, 1))); 7636DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, SyntaxFacts.GetText(operatorToken.Kind()), boundLeft.Display); 9264diagnostics.Add(errorOpt ?? new CSDiagnosticInfo(ErrorCode.ERR_BadIndexLHS, expr.Display), node.Location); 10915diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation()); 10930diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation())); 11041DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_CannotBeMadeNullable, access.Display); 11120DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadUnaryOp, SyntaxFacts.GetText(operatorToken.Kind()), msgId.Localize());
Binder\Binder_Invocation.cs (1)
378diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_MethodNameExpected), expression.Location);
Binder\Binder_Lookup.cs (11)
305CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictingAliasAndDefinition, name, existingDefinition.GetKindText()); 704diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_AbstractAttributeClass, symbol) : null; 735diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_NotAnAttributeClass, symbol) : null; 839var diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_CircularBase, type, other); 1568new CSDiagnosticInfo(ErrorCode.ERR_BindToBogusProp2, symbol, method1, method2) : 1569new CSDiagnosticInfo(ErrorCode.ERR_BindToBogusProp1, symbol, method1 ?? method2); 1780diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, namedType, MessageID.IDS_SK_TYPE.Localize()) : null; 1785diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, namedType, MessageID.IDS_SK_TYPE.Localize(), namedType.Arity) : null; 1801diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_HasNoTypeVars, method, MessageID.IDS_SK_METHOD.Localize()) : null; 1806diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadArity, method, MessageID.IDS_SK_METHOD.Localize(), method.Arity) : null; 1816diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_TypeArgsNotAllowed, symbol, symbol.Kind.Localize()) : null;
Binder\Binder_Statements.cs (2)
1752new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsage, leastOverridden, leastOverridden.ContainingType) : 1753new CSDiagnosticInfo(ErrorCode.ERR_BadEventUsageNoField, leastOverridden);
Binder\Binder_Symbols.cs (16)
620return new CSDiagnosticInfo(ErrorCode.ERR_NullableUnconstrainedTypeParameter, new CSharpRequiredLanguageVersion(requiredVersion)); 753var info = new CSDiagnosticInfo(ErrorCode.ERR_TupleElementNamesAttributeMissing, 1050var info = new CSDiagnosticInfo(ErrorCode.ERR_DynamicAttributeMissing, AttributeDescription.DynamicAttribute.FullName); 1329var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_LookupInTypeVariable, qualifierOpt); 1867useSiteInfo = new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name)); 2068info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigContext, originalSymbols, 2079info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameAggAgg, originalSymbols, 2104info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameNsAgg, originalSymbols, 2119info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameNsAgg, originalSymbols, 2161info = new CSDiagnosticInfo(ErrorCode.ERR_SameFullNameThisAggThisNs, originalSymbols, 2168info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2182info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2208info = new CSDiagnosticInfo(ErrorCode.ERR_AmbiguousAttribute, originalSymbols, 2214info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigContext, originalSymbols, 2224info = new CSDiagnosticInfo(ErrorCode.ERR_AmbigMember, originalSymbols, 2253var errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_SystemVoid);
Binder\Binder_Unsafe.cs (2)
62? new CSDiagnosticInfo(ErrorCode.ERR_UnsafeNeeded) 63: new CSDiagnosticInfo(ErrorCode.ERR_SizeofUnsafe, sizeOfTypeOpt);
Binder\BindingDiagnosticBag.cs (3)
156var info = new CSDiagnosticInfo(code); 169var info = new CSDiagnosticInfo(code, args); 176var info = new CSDiagnosticInfo(code, args, symbols, ImmutableArray<Location>.Empty);
Binder\HostObjectModeBinder.cs (1)
39result.SetFrom(new CSDiagnosticInfo(
Binder\InContainerBinder.cs (1)
120CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictAliasAndMember, name, _container);
Binder\LookupResult.cs (2)
187var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_NonInvocableMemberCalled, unwrappedSymbol) : null; 204var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadSKknown, unwrappedSymbol.Name, unwrappedSymbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()) : null;
Binder\RefSafetyAnalysis.cs (1)
1141diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), location));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
837diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_DuplicateNamedArgument, name), location);
CommandLine\CSharpCommandLineParser.cs (1)
1538diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NullableOptionNotAvailable,
CommandLine\CSharpCompiler.cs (1)
403new CSDiagnosticInfo(ErrorCode.ERR_SymbolDefinedInAssembly, symbol, symbol.ContainingAssembly),
Compilation\CSharpCompilation.cs (3)
1775return new CSDiagnosticInfo( 2994builder.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NullableOptionNotAvailable, 3740diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, m), NoLocation.Singleton);
Compiler\ClsComplianceChecker.cs (2)
1255var info = new CSDiagnosticInfo(code); 1262var info = new CSDiagnosticInfo(code, args);
Compiler\MethodBodySynthesizer.cs (1)
366diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember,
Emitter\Model\PEAssemblyBuilder.cs (2)
151context.Diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CryptoHashFailed), NoLocation.Singleton)); 188diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, modules[i]), NoLocation.Singleton);
Emitter\Model\PEModuleBuilder.cs (5)
175diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ReferencedAssemblyDoesNotHaveStrongName, assembly), NoLocation.Singleton); 182diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_RefCultureMismatch, assembly, refIdentity.CultureName), NoLocation.Singleton); 201diagnostics.Add(new CSDiagnosticInfo(ErrorCode.WRN_ConflictingMachineAssembly, assembly), NoLocation.Singleton); 991diagnostics.Add(new CSDiagnostic(diagInfo ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty), syntaxNodeOpt == null ? NoLocation.Singleton : syntaxNodeOpt.Location)); 1108new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeMustBeStruct, namedTypeSymbol.MetadataName),
Emitter\NoPia\EmbeddedTypesManager.cs (1)
340Error(diagnostics, syntaxOpt, new CSDiagnosticInfo(code, args));
Errors\CSDiagnosticInfo.cs (3)
17public static readonly DiagnosticInfo EmptyErrorInfo = new CSDiagnosticInfo(0); 18public static readonly DiagnosticInfo VoidDiagnosticInfo = new CSDiagnosticInfo(ErrorCode.Void); 52return new CSDiagnosticInfo(this, severity);
Errors\DiagnosticBagExtensions.cs (3)
23var info = new CSDiagnosticInfo(code); 39var info = new CSDiagnosticInfo(code, args); 47var info = new CSDiagnosticInfo(code, args, symbols, ImmutableArray<Location>.Empty);
Errors\LazyArrayElementCantBeRefAnyDiagnosticInfo.cs (1)
36return new CSDiagnosticInfo(ErrorCode.ERR_ArrayElementCantBeRefAny, _possiblyRestrictedTypeSymbol.Type);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
78infos.Add(new CSDiagnosticInfo(code));
Errors\LazyUnmanagedCallersOnlyMethodCalledDiagnosticInfo.cs (1)
41: new CSDiagnosticInfo(_isDelegateConversion
Errors\MessageID.cs (3)
458return new CSDiagnosticInfo(ErrorCode.ERR_FeatureIsExperimental, feature.Localize(), requiredFeature); 463? new CSDiagnosticInfo(ErrorCode.ERR_FeatureInPreview, feature.Localize()) 464: new CSDiagnosticInfo(availableVersion.GetErrorCode(), feature.Localize(), new CSharpRequiredLanguageVersion(requiredVersion));
Errors\MessageProvider.cs (1)
89var info = new CSDiagnosticInfo((ErrorCode)code, args, ImmutableArray<Symbol>.Empty, ImmutableArray<Location>.Empty);
FlowAnalysis\NullableWalker.cs (1)
790var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
519new CSDiagnosticInfo(ErrorCode.ERR_BadAsyncMethodBuilderTaskProperty, builderType, returnType, property.Type), 529new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, builderType, propertyName),
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
278_diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, invocationListProperty.ContainingType, accessorName), syntax.Location);
Lowering\SyntheticBoundNodeFactory.cs (2)
321var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 368var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location);
Symbols\AssemblySymbol.cs (2)
362DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_CycleInTypeForwarder, emittedName.FullName, this.Name); 368var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_TypeForwardedToMultipleAssemblies, forwardingModule, this, emittedName.FullName, destination1, destination2);
Symbols\Attributes\PEAttributeData.cs (3)
187return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty); 196return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, attributeClass, WellKnownMemberNames.InstanceConstructorName); 199return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty);
Symbols\Attributes\RetargetingAttributeData.cs (1)
69return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, AttributeClass, WellKnownMemberNames.InstanceConstructorName);
Symbols\Compilation_WellKnownMembers.cs (2)
163errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeNotFound, emittedName.FullName); 167errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_PredefinedValueTupleTypeAmbiguous3, emittedName.FullName, conflicts.Item1, conflicts.Item2);
Symbols\ConstraintsHelper.cs (19)
179diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(constraintTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, constraintTypeParameter, typeParameter)))); 213diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(errorCode, typeParameter, constraintTypeParameter)))); 251diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(underlyingTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, underlyingTypeParameter, typeParameter)))); 303diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, constraintDeducedBase, deducedBaseType)))); 938diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BadTypeArgument, typeArgument.Type)))); 955diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics)))); 961diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NotRefStructConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 969diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_GenericArgIsStaticClass, typeArgument.Type)))); 978diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RefConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 994diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_UnmanagedConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1018diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_ValConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1069new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers, iface, member)))); 1103diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1107diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintCannotHaveRequiredMembers, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1126nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1133nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1157nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint, containingSymbol.ConstructedFrom(), constraintType, typeParameter, typeArgument)))); 1196diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(errorCode, containingSymbol.ConstructedFrom(), constraintTypeErrorArgument, typeParameter, typeArgumentErrorArgument)))); 1425return new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, deducedBase, classConflict ? "class" : "struct")));
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
217specifierType = new MissingMetadataTypeSymbol.TopLevel(compilation.Assembly.CorLibrary.Modules[0], ref metadataName, new CSDiagnosticInfo(ErrorCode.ERR_TypeNotFound, typeName)); 781MergeUseSiteInfo(ref info, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedCallingConvention, this))); 792MergeUseSiteInfo(ref info, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)));
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
149return new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this));
Symbols\Metadata\PE\PEEventSymbol.cs (1)
82_lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this));
Symbols\Metadata\PE\PEFieldSymbol.cs (2)
158_lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 639MergeUseSiteInfo(ref result, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)));
Symbols\Metadata\PE\PEMethodSymbol.cs (6)
430InitializeUseSiteDiagnostic(new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 883InitializeUseSiteDiagnostic(new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 956diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this); 1440diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_UnrecognizedRefSafetyRulesAttributeVersion, this); 1449diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this); 1455diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_RequiredMembersInvalid, ContainingType);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (6)
209result._lazyCachedUseSiteInfo.Initialize(result.DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, result)); 269result._lazyCachedUseSiteInfo.Initialize(result.DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, result)); 356_lazyCachedUseSiteInfo.Initialize(DeriveCompilerFeatureRequiredDiagnostic() ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this)); 1819var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase); 2129diagnostic = new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this); 2724diagnostic = new CSDiagnosticInfo(ErrorCode.ERR_BogusType, this);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
214result.AccessUncommonFields()._lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, result)); 270AccessUncommonFields()._lazyCachedUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this));
Symbols\Metadata\PE\PETypeParameterSymbol.cs (3)
91_lazyCachedConstraintsUseSiteInfo.Initialize(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 240_lazyCachedConstraintsUseSiteInfo.InterlockedInitializeFromSentinel(primaryDependency: null, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this))); 420_lazyCachedConstraintsUseSiteInfo.InterlockedInitializeFromSentinel(primaryDependency: null, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)));
Symbols\Metadata\PE\PEUtilities.cs (1)
16new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedCompilerFeature, symbol, disallowedFeature)
Symbols\MissingMetadataTypeSymbol.cs (6)
80return new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDef, this, containingAssembly.Identity); 89return new CSDiagnosticInfo(ErrorCode.ERR_NoTypeDefFromModule, this, containingModule.Name); 112return new CSDiagnosticInfo(ErrorCode.ERR_MissingTypeInSource, this); 121return new CSDiagnosticInfo(ErrorCode.ERR_MissingTypeInAssembly, this, containingAssembly.Name); 131return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty); 324new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeNotFound, MetadataHelpers.BuildQualifiedName(_namespaceName, MetadataName)) :
Symbols\NonMissingModuleSymbol.cs (2)
110info = new CSDiagnosticInfo( 127info = new CSDiagnosticInfo(
Symbols\NoPiaAmbiguousCanonicalTypeSymbol.cs (1)
83return new CSDiagnosticInfo(ErrorCode.ERR_NoCanonicalView, _firstCandidate);
Symbols\NoPiaIllegalGenericInstantiationSymbol.cs (1)
69return new CSDiagnosticInfo(ErrorCode.ERR_GenericsUsedAcrossAssemblies, _underlyingSymbol, _exposingModule.ContainingAssembly);
Symbols\NoPiaMissingCanonicalTypeSymbol.cs (1)
107return new CSDiagnosticInfo(ErrorCode.ERR_NoCanonicalView, _fullTypeName);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
269var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
824type.ErrorInfo ?? new CSDiagnosticInfo(ErrorCode.ERR_ErrorInReferencedAssembly, type.ContainingAssembly?.Identity.GetDisplayName() ?? string.Empty), true);
Symbols\Source\SourceAssemblySymbol.cs (1)
1043diagnostics.Add(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, m), NoLocation.Singleton);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
168Diagnostic diag = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_DuplicateExplicitImpl, interfaceMember), this.GetFirstLocation()); 229var info = new CSDiagnosticInfo(ErrorCode.ERR_MixingWinRTEventWithRegular, args, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<Location>(this.GetFirstLocation()));
Symbols\Symbol.cs (2)
1216info = info.AdjustDiagnosticInfo(new CSDiagnosticInfo(ErrorCode.ERR_BindToBogus, this)); 1223var useSiteInfo = new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty));
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
240return new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
179new CSDiagnosticInfo(ErrorCode.WRN_AttributesOnBackingFieldsNotAvailable,
Symbols\Tuples\TupleFieldSymbol.cs (1)
283return new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_TupleInferredNamesNotAvailable, _name,
Symbols\Tuples\TupleTypeSymbol.cs (1)
742new CSDiagnosticInfo(ErrorCode.ERR_PredefinedTypeMemberNotFoundInAssembly,
Symbols\UnboundGenericType.cs (2)
42new CSDiagnosticInfo(ErrorCode.ERR_UnexpectedUnboundGenericName)); 60public static readonly ErrorTypeSymbol Instance = new UnboundArgumentErrorTypeSymbol(string.Empty, new CSDiagnosticInfo(ErrorCode.ERR_UnexpectedUnboundGenericName));
Symbols\UnsupportedMetadataTypeSymbol.cs (1)
29return new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty);
67 references to CSDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (67)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
79var info = new CSDiagnosticInfo(ErrorCode.ERR_UnsupportedTransparentIdentifierAccess, name, new FormattedSymbol(receiver.ExpressionSymbol ?? receiverType, SymbolDisplayFormat.CSharpErrorMessageNoParameterNamesFormat));
Binder\Binder_Expressions.cs (1)
1515case ManagedKind.UnmanagedWithGenerics when MessageID.IDS_FeatureUnmanagedConstructedTypes.GetFeatureAvailabilityDiagnosticInfo(compilation) is CSDiagnosticInfo diagnosticInfo:
Binder\Binder_Lookup.cs (3)
305CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictingAliasAndDefinition, name, existingDefinition.GetKindText()); 839var diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_CircularBase, type, other); 1540private CSDiagnosticInfo MakeCallMethodsDirectlyDiagnostic(Symbol symbol)
Binder\Binder_Symbols.cs (10)
451if (GetUnsafeDiagnosticInfo(sizeOfTypeOpt: null) is CSDiagnosticInfo info) 611internal static CSDiagnosticInfo? GetNullableUnconstrainedTypeParameterDiagnosticIfNecessary(LanguageVersion languageVersion, in TypeWithAnnotations type) 753var info = new CSDiagnosticInfo(ErrorCode.ERR_TupleElementNamesAttributeMissing, 1050var info = new CSDiagnosticInfo(ErrorCode.ERR_DynamicAttributeMissing, AttributeDescription.DynamicAttribute.FullName); 1329var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_LookupInTypeVariable, qualifierOpt); 2048CSDiagnosticInfo info; 2253var errorInfo = new CSDiagnosticInfo(ErrorCode.ERR_SystemVoid); 2315CSDiagnosticInfo info = NotFound(where, simpleName, arity, (where as NameSyntax)?.ErrorDisplayName() ?? simpleName, diagnostics, aliasOpt, qualifierOpt, options); 2545private CSDiagnosticInfo NotFound(SyntaxNode where, string simpleName, int arity, string whereText, BindingDiagnosticBag diagnostics, string aliasOpt, NamespaceOrTypeSymbol qualifierOpt, LookupOptions options) 2569return (CSDiagnosticInfo)errorQualifier.ErrorInfo;
Binder\Binder_Unsafe.cs (3)
30var diagnosticInfo = GetUnsafeDiagnosticInfo(sizeOfTypeOpt); 43var diagnosticInfo = GetUnsafeDiagnosticInfo(sizeOfTypeOpt: null); 53private CSDiagnosticInfo GetUnsafeDiagnosticInfo(TypeSymbol sizeOfTypeOpt)
Binder\BindingDiagnosticBag.cs (8)
154internal CSDiagnosticInfo Add(ErrorCode code, Location location) 156var info = new CSDiagnosticInfo(code); 161internal CSDiagnosticInfo Add(ErrorCode code, SyntaxNode syntax, params object[] args) 164internal CSDiagnosticInfo Add(ErrorCode code, SyntaxToken syntax, params object[] args) 167internal CSDiagnosticInfo Add(ErrorCode code, Location location, params object[] args) 169var info = new CSDiagnosticInfo(code, args); 174internal CSDiagnosticInfo Add(ErrorCode code, Location location, ImmutableArray<Symbol> symbols, params object[] args) 176var info = new CSDiagnosticInfo(code, args, symbols, ImmutableArray<Location>.Empty);
Binder\InContainerBinder.cs (1)
120CSDiagnosticInfo diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_ConflictAliasAndMember, name, _container);
Binder\LookupResult.cs (2)
187var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_NonInvocableMemberCalled, unwrappedSymbol) : null; 204var diagInfo = diagnose ? new CSDiagnosticInfo(ErrorCode.ERR_BadSKknown, unwrappedSymbol.Name, unwrappedSymbol.GetKindText(), MessageID.IDS_SK_TYPE.Localize()) : null;
Compilation\CSharpCompilation.cs (3)
1772private static CSDiagnosticInfo CreateReflectionTypeNotFoundError(Type type) 2065var info = new CSDiagnosticInfo( 2130var info = new CSDiagnosticInfo(
Compiler\ClsComplianceChecker.cs (2)
1255var info = new CSDiagnosticInfo(code); 1262var info = new CSDiagnosticInfo(code, args);
Errors\CSDiagnosticInfo.cs (1)
45private CSDiagnosticInfo(CSDiagnosticInfo original, DiagnosticSeverity severity) : base(original, severity)
Errors\DiagnosticBagExtensions.cs (6)
21internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location) 23var info = new CSDiagnosticInfo(code); 37internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location, params object[] args) 39var info = new CSDiagnosticInfo(code, args); 45internal static CSDiagnosticInfo Add(this DiagnosticBag diagnostics, ErrorCode code, Location location, ImmutableArray<Symbol> symbols, params object[] args) 47var info = new CSDiagnosticInfo(code, args, symbols, ImmutableArray<Location>.Empty);
Errors\LazyDiagnosticInfo.cs (1)
22Interlocked.CompareExchange(ref _lazyInfo, ResolveInfo() ?? CSDiagnosticInfo.VoidDiagnosticInfo, null);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
67var info = featureId.GetFeatureAvailabilityDiagnosticInfo(tree.Options);
Errors\MessageID.cs (3)
447internal static CSDiagnosticInfo? GetFeatureAvailabilityDiagnosticInfo(this MessageID feature, CSharpParseOptions options) 450internal static CSDiagnosticInfo? GetFeatureAvailabilityDiagnosticInfo(this MessageID feature, CSharpCompilation compilation) 453private static CSDiagnosticInfo GetDisabledFeatureDiagnosticInfo(MessageID feature, LanguageVersion availableVersion)
Errors\MessageProvider.cs (1)
89var info = new CSDiagnosticInfo((ErrorCode)code, args, ImmutableArray<Symbol>.Empty, ImmutableArray<Location>.Empty);
FlowAnalysis\NullableWalker.cs (1)
790var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
Parser\Lexer.cs (1)
798var info = feature.GetFeatureAvailabilityDiagnosticInfo(Options);
Parser\Lexer_StringLiteral.cs (1)
155var info = MessageID.IDS_FeatureStringEscapeCharacter.GetFeatureAvailabilityDiagnosticInfo(this.Options);
Parser\SyntaxParser.cs (1)
1142var info = feature.GetFeatureAvailabilityDiagnosticInfo(this.Options);
Symbols\AssemblySymbol.cs (1)
368var diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_TypeForwardedToMultipleAssemblies, forwardingModule, this, emittedName.FullName, destination1, destination2);
Symbols\Compilation_WellKnownMembers.cs (1)
159CSDiagnosticInfo errorInfo;
Symbols\ConstraintsHelper.cs (1)
1005var csDiagnosticInfo = MessageID.IDS_FeatureUnmanagedConstructedTypes.GetFeatureAvailabilityDiagnosticInfo(args.CurrentCompilation);
Symbols\Metadata\PE\PEAssemblySymbol.cs (3)
68private DiagnosticInfo? _lazyCachedCompilerFeatureRequiredDiagnosticInfo = CSDiagnosticInfo.EmptyErrorInfo; 309if (_lazyCachedCompilerFeatureRequiredDiagnosticInfo == CSDiagnosticInfo.EmptyErrorInfo) 314CSDiagnosticInfo.EmptyErrorInfo);
Symbols\Metadata\PE\PEModuleSymbol.cs (3)
120private DiagnosticInfo? _lazyCachedCompilerFeatureRequiredDiagnosticInfo = CSDiagnosticInfo.EmptyErrorInfo; 829if (_lazyCachedCompilerFeatureRequiredDiagnosticInfo == CSDiagnosticInfo.EmptyErrorInfo) 834CSDiagnosticInfo.EmptyErrorInfo);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1819var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
269var info = new CSDiagnosticInfo(ErrorCode.ERR_ImportedCircularBase, declaredBase);
Symbols\Source\LocalFunctionSymbol.cs (1)
398var diagnosticInfo = MessageID.IDS_FeatureLocalFunctionAttributes.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntaxReferenceOpt.SyntaxTree.Options);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
229var info = new CSDiagnosticInfo(ErrorCode.ERR_MixingWinRTEventWithRegular, args, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<Location>(this.GetFirstLocation())); 1076var diagnosticInfo = MessageID.IDS_FeatureCovariantReturnsForOverrides.GetFeatureAvailabilityDiagnosticInfo(this.DeclaringCompilation);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
341var info = diagnostics.Add(ErrorCode.ERR_PartialMultipleBases, GetFirstLocation(), this);
Symbols\Tuples\TupleTypeSymbol.cs (1)
740var diagnosticInfo = container.IsErrorType() ?