72 references to Add
Microsoft.CodeAnalysis (1)
Symbols\Attributes\MarshalAsAttributeDecoder.cs (1)
277arguments.Diagnostics.Add(messageProvider.CreateDiagnostic(warningCode, arguments.AttributeSyntaxOpt.GetLocation()));
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder.cs (8)
531diagnostics.Add(new CSDiagnostic(info, syntax.Location)); 536diagnostics.Add(new CSDiagnostic(info, location)); 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));
Binder\Binder_Expressions.cs (6)
6565target.Add(diagnostic); 7699diagnostics.Add(new CSDiagnostic(diagnosticInfo, operatorToken.GetLocation())); 8210diagnostics.Add(new CSDiagnostic(lookupError, name.Location)); 11314diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation())); 11435diagnostics.Add(new CSDiagnostic(diagnosticInfo, access.Syntax.Location)); 11514diagnostics.Add(new CSDiagnostic(diagnosticInfo, node.Location));
Binder\Binder_InterpolatedString.cs (1)
841target.Add(diagnostic);
Binder\Binder_Invocation.cs (1)
1908diagnostics.Add(d);
Binder\Binder_Operators.cs (1)
1064diagnostics.Add(diagnostic);
Binder\Binder_Symbols.cs (1)
2383diagnostics.Add(new CSDiagnostic(result.Error, where.Location));
Binder\Binder_Unsafe.cs (2)
36diagnostics.Add(new CSDiagnostic(diagnosticInfo, node.Location)); 49diagnostics.Add(new CSDiagnostic(diagnosticInfo, location));
Binder\ForEachLoopBinder.cs (1)
524diagnostics.Add(d.WithLocation(location));
Binder\RefSafetyAnalysis.cs (1)
1181diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), location));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
730diagnostics.Add(new CSDiagnostic(pair.UseSiteInfo.DiagnosticInfo, location));
Compilation\CSharpCompilation.cs (5)
2077diagnostics.Add(new CSDiagnostic(info, candidate.GetFirstLocation())); 2103diagnostics.Add(diagnostic); 2143diagnostics.Add(new CSDiagnostic(info, viableEntryPoints.First().GetFirstLocation())); 3004builder.Add(error.WithLocation(location)); 3018builder.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NullableOptionNotAvailable,
Compiler\ClsComplianceChecker.cs (2)
1257_diagnostics.Add(diag); 1264_diagnostics.Add(diag);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
642_diagnostics.Add(diagnostic.WithLocation(sourceLocation)); 659_diagnostics.Add(diagnostic.WithLocation(sourceLocation));
Compiler\MethodBodySynthesizer.cs (1)
366diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember,
Compiler\MethodBodySynthesizer.Lowered.cs (5)
124diagnostics.Add(ex.Diagnostic); 217diagnostics.Add(ex.Diagnostic); 256diagnostics.Add(ex.Diagnostic); 289diagnostics.Add(ex.Diagnostic); 338diagnostics.Add(ex.Diagnostic);
Emitter\Model\SynthesizedPrivateImplementationDetailsStaticConstructor.cs (1)
70diagnostics.Add(missing.Diagnostic);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
463F.Diagnostics.Add(diagnostic); 521F.Diagnostics.Add(badTaskProperty); 531F.Diagnostics.Add(diagnostic);
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
94diagnostics.Add(ex.Diagnostic);
Lowering\ClosureConversion\ClosureConversion.cs (1)
1733Diagnostics.Add(ex.Diagnostic);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
126diagnostics.Add(ex.Diagnostic);
Lowering\IteratorRewriter\IteratorRewriter.cs (1)
206diagnostics.Add(ex.Diagnostic);
Lowering\LocalRewriter\LocalRewriter.cs (1)
170diagnostics.Add(ex.Diagnostic);
Symbols\Source\SourceAssemblySymbol.cs (1)
588diagnostics.Add(StrongNameKeys.DiagnosticOpt);
Symbols\Symbol_Attributes.cs (1)
518filtered.Add(d);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListConstructor.cs (1)
44diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorConstructor.cs (1)
44diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListMethod.cs (1)
33diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
74diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
136diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (1)
177diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperator.cs (1)
81diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (1)
171diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
122diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordInequalityOperator.cs (1)
46diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
76diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
232diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (1)
84diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayAsReadOnlySpanMethod.cs (1)
44diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayAsSpanMethod.cs (1)
42diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayElementRefMethod.cs (1)
44diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayElementRefReadOnlyMethod.cs (1)
46diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefMethod.cs (1)
40diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedInlineArrayFirstElementRefReadOnlyMethod.cs (1)
42diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedParameterlessThrowMethod.cs (1)
40diagnostics.Add(ex.Diagnostic);
Symbols\Synthesized\SynthesizedThrowSwitchExpressionExceptionMethod.cs (1)
41diagnostics.Add(ex.Diagnostic);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTests.cs (1)
13295diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_IntDivByZero), NoLocation.Singleton));