39 references to Add
Microsoft.CodeAnalysis.CSharp (37)
BoundTree\BoundTreeVisitors.cs (1)
175
diagnostics.
Add
(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node));
Compilation\CSharpCompilation.cs (3)
513
diagnostics.
Add
(ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None);
1728
diagnostics.
Add
(ErrorCode.ERR_SimpleProgramDisallowsMainType, NoLocation.Singleton);
3469
runtimeMDVersionDiagnostics.
Add
(ErrorCode.WRN_NoRuntimeMetadataVersion, NoLocation.Singleton);
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
104
_diagnostics.
Add
(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(trivia.SyntaxTree, new TextSpan(start, length)));
Declarations\DeclarationTreeBuilder.cs (12)
120
bag.
Add
(ErrorCode.ERR_SimpleProgramIsEmpty, ((EmptyStatementSyntax)firstGlobalStatement.Statement).SemicolonToken.GetLocation());
365
diagnostics.
Add
(ErrorCode.ERR_GlobalUsingOutOfOrder, directive.GlobalKeyword.GetLocation());
451
diagnostics.
Add
(ErrorCode.ERR_MultipleFileScopedNamespace, node.Name.GetLocation());
460
diagnostics.
Add
(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation());
478
diagnostics.
Add
(ErrorCode.ERR_FileScopedNamespaceNotBeforeAllMembers, node.Name.GetLocation());
490
diagnostics.
Add
(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation());
497
diagnostics.
Add
(ErrorCode.ERR_UnexpectedGenericName, node.Name.GetLocation());
502
diagnostics.
Add
(ErrorCode.ERR_UnexpectedAliasedName, node.Name.GetLocation());
507
diagnostics.
Add
(ErrorCode.ERR_BadModifiersOnNamespace, node.AttributeLists[0].GetLocation());
512
diagnostics.
Add
(ErrorCode.ERR_BadModifiersOnNamespace, node.Modifiers[0].GetLocation());
519
diagnostics.
Add
(ErrorCode.ERR_GlobalUsingInNamespace, directive.GlobalKeyword.GetLocation());
643
diagnostics.
Add
(ErrorCode.ERR_UnexpectedParameterList, node.ParameterList.GetLocation());
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
81
diagnostics.
Add
(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(tree, new TextSpan(start, length)));
Emitter\EditAndContinue\EmitHelpers.cs (1)
87
diagnostics.
Add
(ErrorCode.ERR_EncUpdateFailedDelegateTypeChanged, Location.None);
Errors\MessageProvider.cs (1)
282
diagnostics.
Add
(ErrorCode.ERR_ParameterNotValidForType, node.ArgumentList.Arguments[namedArgumentIndex].Location);
FlowAnalysis\AbstractFlowPass.cs (1)
891
Diagnostics.
Add
(ErrorCode.ERR_InternalError, node.Syntax.Location);
FlowAnalysis\ControlFlowPass.cs (6)
143
Diagnostics.
Add
(ErrorCode.WRN_UnreferencedLabel, label.Locations[0]);
228
Diagnostics.
Add
(ErrorCode.ERR_BadDelegateLeave, loc);
269
Diagnostics.
Add
(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken));
311
Diagnostics.
Add
(ErrorCode.ERR_BadFinallyLeave, location);
351
Diagnostics.
Add
(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation);
364
Diagnostics.
Add
(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
FlowAnalysis\DefiniteAssignment.cs (2)
413
Diagnostics.
Add
(ErrorCode.WRN_AsyncLacksAwaits, diagnosticLocation);
1245
Diagnostics.
Add
(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
Symbols\Source\ModifierUtils.cs (1)
414
diagnostics.
Add
(
Symbols\Source\SourceMemberContainerSymbol.cs (1)
499
diagnostics.
Add
(error, location);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (5)
471
diagnostics.
Add
(ErrorCode.ERR_ExternAliasNotAllowed, aliasSyntax.Location);
488
diagnostics.
Add
(ErrorCode.ERR_GlobalExternAlias, aliasSyntax.Identifier.GetLocation());
656
diagnostics.
Add
(ErrorCode.WRN_GlobalAliasDefn, location);
661
diagnostics.
Add
(ErrorCode.ERR_NoAliasHere, location);
725
diagnostics.
Add
(ErrorCode.ERR_BadUnsafeInUsingDirective, usingDirective.UnsafeKeyword.GetLocation());
Symbols\Symbol.cs (1)
1348
diagnostics.
Add
(
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (2)
EvaluationContext.cs (1)
340
diagnostics.
Add
(ErrorCode.ERR_ExpressionOrDeclarationExpected, Location.None);
Rewriters\LocalDeclarationRewriter.cs (1)
100
diagnostics.
Add
(ErrorCode.ERR_DeclarationExpressionNotPermitted, local.Locations[0]);