38 references to Add
Microsoft.CodeAnalysis.CSharp (38)
BoundTree\BoundTreeVisitors.cs (1)
175
diagnostics.
Add
(ErrorCode.ERR_InsufficientStack, GetTooLongOrComplexExpressionErrorLocation(Node));
Compilation\CSharpCompilation.cs (2)
613
diagnostics.
Add
(ErrorCode.ERR_DebugEntryPointNotSourceMethodDefinition, Location.None);
3994
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)
197
bag.
Add
(ErrorCode.ERR_SimpleProgramIsEmpty, ((EmptyStatementSyntax)firstGlobalStatement.Statement).SemicolonToken.GetLocation());
451
diagnostics.
Add
(ErrorCode.ERR_GlobalUsingOutOfOrder, directive.GlobalKeyword.GetLocation());
537
diagnostics.
Add
(ErrorCode.ERR_MultipleFileScopedNamespace, node.Name.GetLocation());
546
diagnostics.
Add
(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation());
564
diagnostics.
Add
(ErrorCode.ERR_FileScopedNamespaceNotBeforeAllMembers, node.Name.GetLocation());
576
diagnostics.
Add
(ErrorCode.ERR_FileScopedAndNormalNamespace, node.Name.GetLocation());
583
diagnostics.
Add
(ErrorCode.ERR_UnexpectedGenericName, node.Name.GetLocation());
588
diagnostics.
Add
(ErrorCode.ERR_UnexpectedAliasedName, node.Name.GetLocation());
593
diagnostics.
Add
(ErrorCode.ERR_BadModifiersOnNamespace, node.AttributeLists[0].GetLocation());
598
diagnostics.
Add
(ErrorCode.ERR_BadModifiersOnNamespace, node.Modifiers[0].GetLocation());
605
diagnostics.
Add
(ErrorCode.ERR_GlobalUsingInNamespace, directive.GlobalKeyword.GetLocation());
760
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)));
Errors\MessageProvider.cs (1)
277
diagnostics.
Add
(ErrorCode.ERR_ParameterNotValidForType, node.ArgumentList.Arguments[namedArgumentIndex].Location);
FlowAnalysis\AbstractFlowPass.cs (1)
898
Diagnostics.
Add
(ErrorCode.ERR_InternalError, node.Syntax.Location);
FlowAnalysis\ControlFlowPass.cs (6)
142
Diagnostics.
Add
(ErrorCode.WRN_UnreferencedLabel, label.GetFirstLocation());
227
Diagnostics.
Add
(ErrorCode.ERR_BadDelegateLeave, loc);
268
Diagnostics.
Add
(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken));
311
Diagnostics.
Add
(ErrorCode.ERR_BadFinallyLeave, location);
351
Diagnostics.
Add
(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation);
363
Diagnostics.
Add
(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
FlowAnalysis\DefiniteAssignment.cs (1)
1248
Diagnostics.
Add
(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
100
diagnostics.
Add
(ErrorCode.ERR_RefLocalAcrossAwait, syntax.Location);
Symbols\Source\LocalFunctionSymbol.cs (1)
78
_declarationDiagnostics.
Add
(ErrorCode.ERR_BadExtensionAgg, GetFirstLocation());
Symbols\Source\ModifierUtils.cs (1)
460
diagnostics.
Add
(
Symbols\Source\SourceMemberContainerSymbol.cs (1)
532
diagnostics.
Add
(error, location);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (5)
482
diagnostics.
Add
(ErrorCode.ERR_ExternAliasNotAllowed, aliasSyntax.Location);
499
diagnostics.
Add
(ErrorCode.ERR_GlobalExternAlias, aliasSyntax.Identifier.GetLocation());
668
diagnostics.
Add
(ErrorCode.WRN_GlobalAliasDefn, location);
673
diagnostics.
Add
(ErrorCode.ERR_NoAliasHere, location);
742
diagnostics.
Add
(ErrorCode.ERR_BadUnsafeInUsingDirective, unsafeKeywordLocation);
Symbols\Symbol.cs (1)
1504
diagnostics.
Add
(
Symbols\Symbol_Attributes.cs (1)
230
arguments.Diagnostics.DiagnosticBag.
Add
(ErrorCode.ERR_InvalidExperimentalDiagID, attrArgumentLocation);
Symbols\SymbolExtensions.cs (1)
294
diagnostics.
Add
(ErrorCode.ERR_IllegalUnsafe, errorLocation);