58 instantiations of CSDiagnostic
Microsoft.CodeAnalysis.CSharp (46)
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 (4)
7690diagnostics.Add(new CSDiagnostic(diagnosticInfo, operatorToken.GetLocation())); 8201diagnostics.Add(new CSDiagnostic(lookupError, name.Location)); 11321diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_InvalidDelegateType, possibleDelegateType), getErrorLocation())); 11442diagnostics.Add(new CSDiagnostic(diagnosticInfo, access.Syntax.Location));
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\RefSafetyAnalysis.cs (1)
1180diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), location));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
730diagnostics.Add(new CSDiagnostic(pair.UseSiteInfo.DiagnosticInfo, location));
CommandLine\CSharpCommandLineParser.cs (1)
1536diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NullableOptionNotAvailable,
CommandLine\CSharpCompiler.cs (1)
402newDiagnostics.Add(new CSDiagnostic(
Compilation\CSharpCompilation.cs (3)
2077diagnostics.Add(new CSDiagnostic(info, candidate.GetFirstLocation())); 2143diagnostics.Add(new CSDiagnostic(info, viableEntryPoints.First().GetFirstLocation())); 3018builder.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_NullableOptionNotAvailable,
Compiler\ClsComplianceChecker.cs (2)
1256var diag = new CSDiagnostic(info, location); 1263var diag = new CSDiagnostic(info, location);
Compiler\MethodBodySynthesizer.cs (1)
366diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember,
Emitter\Model\PEAssemblyBuilder.cs (1)
156context.Diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_CryptoHashFailed), NoLocation.Singleton));
Emitter\Model\PEModuleBuilder.cs (2)
991diagnostics.Add(new CSDiagnostic(diagInfo ?? new CSDiagnosticInfo(ErrorCode.ERR_BogusType, string.Empty), syntaxNodeOpt == null ? NoLocation.Singleton : syntaxNodeOpt.Location)); 1107new CSDiagnostic(
Emitter\NoPia\EmbeddedTypesManager.cs (1)
344diagnostics.Add(new CSDiagnostic(info, syntaxOpt == null ? NoLocation.Singleton : syntaxOpt.Location));
Errors\CSDiagnostic.cs (3)
35return new CSDiagnostic(this.Info, location, this.IsSuppressed); 46return new CSDiagnostic(info, this.Location, this.IsSuppressed); 56return new CSDiagnostic(this.Info, this.Location, isSuppressed);
Errors\DiagnosticBagExtensions.cs (5)
24var diag = new CSDiagnostic(info, location); 40var diag = new CSDiagnostic(info, location); 48var diag = new CSDiagnostic(info, location); 55var diag = new CSDiagnostic(info, location); 100diagnostics.Add(new CSDiagnostic(info, location));
Errors\MessageProvider.cs (2)
90return new CSDiagnostic(info, location); 95return new CSDiagnostic(info, Location.None);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
460var diagnostic = new CSDiagnostic( 518var badTaskProperty = new CSDiagnostic( 528var diagnostic = new CSDiagnostic(
Lowering\SyntheticBoundNodeFactory.cs (2)
329var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 376var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
168Diagnostic diag = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_DuplicateExplicitImpl, interfaceMember), this.GetFirstLocation());
Syntax\SyntaxTreeDiagnosticEnumerator.cs (1)
66_current = new CSDiagnostic(sdi, new SourceLocation(_syntaxTree, new TextSpan(spanStart, spanWidth)));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (7)
9405var diag = new CSDiagnostic(new DiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.ERR_MetadataNameTooLong, "<name>"), loc); 12567new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_LowercaseEllSuffix), Location.None).GetMessage(CultureInfo.InvariantCulture), 12607new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_EmptySwitch), Location.None).GetMessage(CultureInfo.InvariantCulture), 12663new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_UnreferencedField, "C.f"), Location.None).GetMessage(CultureInfo.InvariantCulture), 12731new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_PrecedenceInversion, "from"), Location.None).GetMessage(CultureInfo.InvariantCulture), 12831new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_SequentialOnPartialClass, "MyPartialStruct"), Location.None).GetMessage(CultureInfo.InvariantCulture), 12941new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.WRN_SequentialOnPartialClass, "MyPartialStruct"), Location.None).GetMessage(CultureInfo.InvariantCulture),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTests.cs (1)
13295diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_IntDivByZero), NoLocation.Singleton));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\DiagnosticTest.cs (2)
84var d1 = new CSDiagnostic(di2, l1); 99var d3 = new CSDiagnostic(di3, new SourceLocation(syntaxTree, new TextSpan(1, 1)));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
DiagnosticExtensions.cs (2)
18actual.Select(info => new CSDiagnostic(info, NoLocation.Singleton)).Verify(expected); 23actual.Select(info => new CSDiagnostic(info, NoLocation.Singleton)).Verify(expected);
19 references to CSDiagnostic
Microsoft.CodeAnalysis.CSharp (11)
Compiler\ClsComplianceChecker.cs (2)
1256var diag = new CSDiagnostic(info, location); 1263var diag = new CSDiagnostic(info, location);
Errors\DiagnosticBagExtensions.cs (4)
24var diag = new CSDiagnostic(info, location); 40var diag = new CSDiagnostic(info, location); 48var diag = new CSDiagnostic(info, location); 55var diag = new CSDiagnostic(info, location);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
460var diagnostic = new CSDiagnostic( 518var badTaskProperty = new CSDiagnostic( 528var diagnostic = new CSDiagnostic(
Lowering\SyntheticBoundNodeFactory.cs (2)
329var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 376var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9405var diag = new CSDiagnostic(new DiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.ERR_MetadataNameTooLong, "<name>"), loc);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
SourceGeneration\GeneratorDriverTests.cs (4)
1164c.ReportDiagnostic(CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2)); 1165c.ReportDiagnostic(CSDiagnostic.Create("GEN002", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 3)); 1215var gen001 = CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, true, 2); 1286var gen001 = CSDiagnostic.Create("GEN001", "generators", "message", DiagnosticSeverity.Warning, DiagnosticSeverity.Warning, isEnabledByDefault: true, warningLevel: 2);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\DiagnosticTest.cs (2)
84var d1 = new CSDiagnostic(di2, l1); 99var d3 = new CSDiagnostic(di3, new SourceLocation(syntaxTree, new TextSpan(1, 1)));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticDescription.cs (1)
489var isCSharpOrRazor = actual.Any() && actual.First() is CSDiagnostic or { Descriptor.Category: "Razor" };