50 references to Add
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder_Symbols.cs (1)
2765diagnostics?.Add(ErrorCode.WRN_ErrorOverride, getLocation(data), diagInfo, (int)diagInfo.Code);
Compilation\CSharpCompilation.cs (2)
3499diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, NoLocation.Singleton, ((Cci.INamedEntity)moduleBeingBuilt).Name, 3616_diagnostics.Add(ErrorCode.ERR_FileTypeNonUniquePath, location, symbol, filePath);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (4)
304includeDiagnostics.Add(ErrorCode.WRN_InvalidInclude, location, subMessage); 346includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, e.Message); 358includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, errorMessage); 405includeDiagnostics.Add(ErrorCode.WRN_XMLParseIncludeError, errorLocation, GetDescription(e)); //NOTE: location is in included file.
Emitter\EditAndContinue\EmitHelpers.cs (1)
171diagnostics.Add(
Emitter\Model\PEModuleBuilder.cs (5)
695diagnostics.Add(ErrorCode.ERR_ExportedTypeConflictsWithDeclaration, NoLocation.Singleton, type, type.ContainingModule); 699diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithDeclaration, NoLocation.Singleton, type); 715diagnostics.Add(ErrorCode.ERR_ExportedTypesConflict, NoLocation.Singleton, type, type.ContainingModule, contender, contender.ContainingModule); 720diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithExportedType, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingModule); 725diagnostics.Add(ErrorCode.ERR_ForwardedTypesConflict, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingAssembly);
Errors\MessageProvider.cs (5)
207diagnostics.Add(ErrorCode.ERR_DuplicateImport, location, 214diagnostics.Add(ErrorCode.ERR_DuplicateImportSimple, location, 261diagnostics.Add(ErrorCode.ERR_InvalidAttributeArgument, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), node.GetErrorDisplayName()); 278diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeNotValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName); 283diagnostics.Add(ErrorCode.ERR_MarshalUnmanagedTypeOnlyValidForFields, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), unmanagedTypeName);
FlowAnalysis\DefiniteAssignment.cs (16)
489Diagnostics.Add( 496Diagnostics.Add( 514Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 533Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 693diagnostics.Add(ErrorCode.ERR_LocalCantBeFixedAndHoisted, location, captured.Name); 1242Diagnostics.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName); 1247Diagnostics.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName); 1299Diagnostics.Add( 1313Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1323Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1339Diagnostics.Add( 1347Diagnostics.Add( 1354Diagnostics.Add( 1950Diagnostics.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ? 2327Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name); 2346Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
FlowAnalysis\NullableWalker.cs (7)
1055Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name); 1124Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false"); 1283Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name); 1310Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false"); 1369Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name); 1374Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name); 2643Diagnostics.Add(errorCode, location, arguments);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
701_diagnostics.Add(ErrorCode.ERR_SpecialByRefInLambda, syntax.Location, type);
Symbols\ReferenceManager.cs (1)
107diagnostics.Add(ErrorCode.ERR_AssemblySpecifiedForLinkAndRef, NoLocation.Singleton, duplicateReference.Display, primaryReference.Display);
Symbols\Source\ModifierUtils.cs (1)
451diagnostics.Add(
Symbols\Source\SourceAssemblySymbol.cs (5)
2736diagnostics.Add(ErrorCode.WRN_UnreferencedEvent, associatedPropertyOrEvent.GetFirstLocationOrNone(), associatedPropertyOrEvent); 2741diagnostics.Add(ErrorCode.WRN_UnreferencedField, field.GetFirstLocationOrNone(), field); 2745diagnostics.Add(ErrorCode.WRN_UnassignedInternalRefField, field.GetFirstLocationOrNone(), field); 2749diagnostics.Add(ErrorCode.WRN_UnassignedInternalField, field.GetFirstLocationOrNone(), field, DefaultValue(field.Type)); 2769diagnostics.Add(ErrorCode.WRN_UnreferencedFieldAssg, field.GetFirstLocationOrNone(), field);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
688diagnostics.Add(ErrorCode.ERR_DuplicateAlias, location, identifierValueText);