448 references to WRN_UnreferencedVarAssg
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
268
case ErrorCode.
WRN_UnreferencedVarAssg
:
795
or ErrorCode.
WRN_UnreferencedVarAssg
FlowAnalysis\DefiniteAssignment.cs (1)
2340
Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.
WRN_UnreferencedVarAssg
: ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
Generated\ErrorFacts.Generated.cs (1)
23
case ErrorCode.
WRN_UnreferencedVarAssg
:
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (10)
37
""", GetFormattedErrorTitle(ErrorCode.
WRN_UnreferencedVarAssg
));
46
""", GetFormattedErrorTitle(ErrorCode.
WRN_UnreferencedVarAssg
));
53
""", GetFormattedErrorTitle(ErrorCode.
WRN_UnreferencedVarAssg
));
67
", GetFormattedErrorTitle(ErrorCode.
WRN_UnreferencedVarAssg
));
74
[InlineData("#pragma warning disable $$219.0", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
75
[InlineData("#pragma warning disable $$219.5", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
91
[InlineData("#pragma warning disable $$CS0219", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
92
[InlineData("#pragma warning disable CS0162, $$CS0219", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
93
[InlineData("#pragma warning disable CS0162, CS0219$$", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
95
[InlineData("#pragma warning $$disable CS0219, CS0162", (int)ErrorCode.
WRN_UnreferencedVarAssg
)]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (44)
BreakingChanges.cs (5)
46
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o2").WithArguments("o2")
739
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a"));
1064
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "b1").WithArguments("b1"),
1067
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "b3").WithArguments("b3"));
1475
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "A6").WithArguments("A6"));
CodeGen\CodeGenDeconstructTests.cs (1)
9440
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 17),
CodeGen\CodeGenTupleTest.cs (31)
2972
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(11, 20),
3288
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13));
4473
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13)
6971
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(7, 25),
6974
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(10, 25),
6977
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(13, 29)
8025
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(7, 24),
8028
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(9, 28)
10415
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t1").WithArguments("t1").WithLocation(8, 13)
10670
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t2").WithArguments("t2").WithLocation(8, 13),
10679
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v2").WithArguments("v2").WithLocation(18, 13)
10720
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13)
10948
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 20),
19608
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(6, 22),
19611
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(7, 25)
24106
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t1").WithArguments("t1").WithLocation(13, 30),
24109
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t2").WithArguments("t2").WithLocation(14, 32),
24112
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t3").WithArguments("t3").WithLocation(15, 40),
24115
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t4").WithArguments("t4").WithLocation(19, 20),
24118
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t5").WithArguments("t5").WithLocation(20, 20),
24121
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t6").WithArguments("t6").WithLocation(22, 26),
24124
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t7").WithArguments("t7").WithLocation(23, 26),
24127
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t8").WithArguments("t8").WithLocation(24, 21),
24130
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t9").WithArguments("t9").WithLocation(26, 20),
24133
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t10").WithArguments("t10").WithLocation(27, 20),
24136
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t11").WithArguments("t11").WithLocation(28, 20),
24139
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t12").WithArguments("t12").WithLocation(30, 16),
24142
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t13").WithArguments("t13").WithLocation(31, 21),
24145
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t14").WithArguments("t14").WithLocation(32, 21)
25874
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t1").WithArguments("t1").WithLocation(6, 20),
25877
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t2").WithArguments("t2").WithLocation(7, 13)
CodeGen\CodeGenUsingDeclarationTests.cs (3)
1561
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "obj").WithArguments("obj").WithLocation(5, 40));
1573
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "obj").WithArguments("obj").WithLocation(1, 32));
1621
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "obj").WithArguments("obj").WithLocation(1, 43));
Emit\CompilationEmitTests.cs (1)
4666
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "b").WithArguments("b"));
Emit\EmitErrorTests.cs (2)
84
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
305
warnOpts.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.
WRN_UnreferencedVarAssg
), ReportDiagnostic.Suppress);
PrivateProtected.cs (1)
367
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(11, 21),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
12009
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (115)
Attributes\AttributeTests_IsByRefLike.cs (6)
857
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v1").WithArguments("v1").WithLocation(7, 17),
860
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v2").WithArguments("v2").WithLocation(8, 17)
923
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v1").WithArguments("v1").WithLocation(7, 17),
926
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v2").WithArguments("v2").WithLocation(10, 17)
941
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v1").WithArguments("v1").WithLocation(7, 17),
944
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v2").WithArguments("v2").WithLocation(10, 17)
Diagnostics\DiagnosticAnalyzerTests.cs (4)
2675
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(1, 35));
3772
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local1").WithArguments("local1").WithLocation(6, 13));
3788
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local1").WithArguments("local1").WithLocation(6, 13),
3791
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local2").WithArguments("local2").WithLocation(11, 13));
Diagnostics\GetDiagnosticsTests.cs (2)
1195
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(6, 13));
1203
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(6, 13));
Diagnostics\OperationAnalyzerTests.cs (1)
1826
.VerifyDiagnostics(Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(6, 16))
FieldKeywordTests.cs (1)
10793
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "unrelated").WithArguments("unrelated").WithLocation(8, 20),
FlowAnalysis\FlowDiagnosticTests.cs (10)
43
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1"),
46
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i3").WithArguments("i3"),
49
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i4").WithArguments("i4"),
52
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i6").WithArguments("i6"),
55
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i7").WithArguments("i7"),
58
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i8").WithArguments("i8"),
61
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i9").WithArguments("i9"));
914
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "M").WithArguments("M")
945
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(7, 11),
2007
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1"));
FlowAnalysis\FlowTests.cs (8)
5585
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Unused").WithArguments("Unused").WithLocation(8, 19));
5608
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Unused").WithArguments("Unused").WithLocation(8, 19));
5635
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Unused").WithArguments("Unused").WithLocation(12, 19));
5662
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Unused").WithArguments("Unused").WithLocation(12, 19));
5693
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "N6").WithArguments("N6").WithLocation(16, 19));
5747
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Z").WithArguments("Z").WithLocation(9, 26));
5778
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "N6").WithArguments("N6").WithLocation(16, 19));
5808
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "Z").WithArguments("Z").WithLocation(9, 26));
Semantics\OutVarTests.cs (42)
1794
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(6, 13)
3855
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(97, 17),
4907
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
5903
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
6321
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
6556
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
6809
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
7058
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
7296
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
7522
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(20, 18),
7528
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(28, 18),
7540
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(44, 19),
7546
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(52, 19),
8378
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
8656
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(101, 17)
10714
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
13189
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
15110
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
15524
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
15737
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
15950
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
16393
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
16950
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(41, 13),
17356
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
17740
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(7, 13)
19638
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(9, 13),
19652
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(9, 13),
20731
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(6, 25),
21636
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
21788
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x7").WithArguments("x7").WithLocation(20, 19),
22005
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
22418
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
23666
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(74, 9)
23764
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(74, 9)
24004
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
24108
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
25286
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
25382
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9),
25923
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(21, 5),
34254
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(6, 13),
34573
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(12, 53),
34591
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(21, 53)
Semantics\PatternMatchingTests.cs (1)
76
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i2").WithArguments("i2").WithLocation(8, 13),
Semantics\PatternMatchingTests_Global.cs (7)
419
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(21, 5),
6937
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(74, 9)
7035
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(74, 9)
7254
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
7358
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
8476
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9)
8572
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(52, 9),
Semantics\PatternMatchingTests_Scope.cs (29)
193
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
575
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
845
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
1152
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(110, 17)
5493
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
5700
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
5907
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
7078
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
7397
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(97, 17),
7715
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
7944
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
8191
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
8434
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
8666
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
8886
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(20, 18),
8892
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(28, 18),
8904
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(44, 19),
8910
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(52, 19),
9294
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
9506
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
9792
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
10066
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(41, 13),
10556
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(39, 13),
12466
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(109, 17),
12612
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x7").WithArguments("x7").WithLocation(20, 19),
12826
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
13221
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y12").WithArguments("y12").WithLocation(87, 17),
13948
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x4").WithArguments("x4").WithLocation(29, 13),
13966
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(37, 13),
Semantics\PatternMatchingTests4.cs (4)
1403
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "_").WithArguments("_").WithLocation(6, 19)
1432
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "_").WithArguments("_").WithLocation(6, 19)
1683
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "_").WithArguments("_").WithLocation(6, 19)
1714
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "_").WithArguments("_").WithLocation(6, 19),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (63)
IOperation\IOperationTests_IConversionExpression.cs (23)
216
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "e1").WithArguments("e1").WithLocation(5, 25)
291
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "e1").WithArguments("e1").WithLocation(5, 25)
444
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1").WithLocation(6, 26)
480
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1").WithLocation(10, 23)
546
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(8, 24)
581
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(8, 24)
615
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(8, 26)
646
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 24)
2127
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(11, 21)
2609
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1").WithLocation(7, 31)
2645
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1").WithLocation(7, 31)
2809
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 13)
2857
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 13)
3257
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(10, 34)
3484
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 23)
3519
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 24)
3548
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 13)
3585
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 23)
3656
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "e1").WithArguments("e1").WithLocation(6, 22)
3694
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 23)
3737
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "e2").WithArguments("e2").WithLocation(6, 22)
3786
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "e2").WithArguments("e2").WithLocation(6, 22)
5119
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(10, 34)
IOperation\IOperationTests_IForEachLoopStatement.cs (1)
1323
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 13)
IOperation\IOperationTests_IIfStatement.cs (6)
53
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "condition").WithArguments("condition").WithLocation(6, 14)
109
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "condition").WithArguments("condition").WithLocation(6, 14)
156
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "condition").WithArguments("condition").WithLocation(6, 14)
1341
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(8, 13)
1606
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "condition").WithArguments("condition").WithLocation(6, 14)
1681
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "condition").WithArguments("condition").WithLocation(6, 14)
IOperation\IOperationTests_INameOfOperation.cs (2)
35
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "test").WithArguments("test").WithLocation(6, 16)
82
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "test").WithArguments("test").WithLocation(6, 16)
IOperation\IOperationTests_IParameterReferenceExpression.cs (1)
44
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "tuple").WithArguments("tuple").WithLocation(6, 13)
IOperation\IOperationTests_IPatternSwitchCase.cs (1)
587
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(7, 14)
IOperation\IOperationTests_IThrowOperation.cs (1)
170
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13)
IOperation\IOperationTests_ITupleExpression.cs (3)
1360
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(6, 20)
1440
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(6, 13)
1788
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(6, 20)
IOperation\IOperationTests_IVariableDeclaration.cs (22)
80
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 23)
189
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 23),
192
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i2").WithArguments("i2").WithLocation(6, 31)
233
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i2").WithArguments("i2").WithLocation(6, 30)
555
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 23)
988
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(6, 34),
1038
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(6, 34),
1091
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(6, 38),
1144
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(6, 38),
1316
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
1379
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
1815
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2336
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2397
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2456
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2535
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j").WithLocation(6, 35)
2865
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2905
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(6, 29)
2945
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(9, 29),
2948
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i2").WithArguments("i2").WithLocation(9, 37)
3269
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i1").WithArguments("i1").WithLocation(7, 29)
3309
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i2").WithArguments("i2").WithLocation(7, 37)
IOperation\IOperationTests_TryCatch.cs (3)
558
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(10, 17)
613
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(13, 17)
756
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(11, 17)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (114)
Semantics\BindingAsyncTests.cs (1)
3280
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "tr").WithArguments("tr").WithLocation(9, 13),
Semantics\BindingTests.cs (2)
2044
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(7, 39)
2074
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "c").WithArguments("c").WithLocation(6, 14));
Semantics\ColorColorTests.cs (3)
979
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "var").WithArguments("var"),
1414
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "E").WithArguments("E"));
1908
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(12, 13)
Semantics\ConstantTests.cs (7)
1785
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(7, 17),
1788
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "intConversion").WithArguments("intConversion").WithLocation(20, 13),
1791
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "uintConversion").WithArguments("uintConversion").WithLocation(21, 14),
1794
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "longConversion").WithArguments("longConversion").WithLocation(22, 14),
1797
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "ulongConversion").WithArguments("ulongConversion").WithLocation(23, 15));
3292
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 36),
3374
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(2, 28)
Semantics\DeconstructionTests.cs (4)
3122
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(8, 13),
3125
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 20)
3219
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(8, 13),
3222
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 20)
Semantics\DelegateTypeTests.cs (1)
18995
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "d").WithArguments("d").WithLocation(1, 15));
Semantics\ImplicitObjectCreationTests.cs (8)
100
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v2").WithArguments("v2").WithLocation(11, 11),
106
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v3").WithArguments("v3").WithLocation(12, 12),
620
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x0").WithArguments("x0").WithLocation(6, 13),
623
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(7, 13)
667
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x0").WithArguments("x0").WithLocation(7, 30),
670
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(9, 13)
2542
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(7, 19)
2889
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j").WithLocation(7, 13)
Semantics\InterpolationTests.cs (1)
18303
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(1, 5),
Semantics\LambdaTests.cs (3)
663
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "message").WithArguments("message").WithLocation(8, 22),
7744
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(6, 26),
8106
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(7, 13));
Semantics\LocalFunctionTests.cs (2)
2256
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(23, 23));
2484
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local").WithArguments("local").WithLocation(16, 13));
Semantics\MethodBodyModelTests.cs (2)
571
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x")
644
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "C").WithArguments("C")
Semantics\NameCollisionTests.cs (4)
793
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "name6").WithArguments("name6").WithLocation(19, 32)
1343
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "name1").WithArguments("name1").WithLocation(17, 21),
1349
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "name1").WithArguments("name1").WithLocation(22, 17),
1352
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "name1").WithArguments("name1").WithLocation(27, 17)
Semantics\NameOfTests.cs (3)
863
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(9, 11)
2905
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v").WithArguments("v").WithLocation(7, 13),
2927
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "v").WithArguments("v").WithLocation(7, 13),
Semantics\NullableReferenceTypesTests.cs (8)
1164
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y2").WithArguments("y2").WithLocation(7, 16),
4145
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 17)
4155
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 17)
4460
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 16),
8133
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 16),
36063
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(8, 16),
83769
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t").WithArguments("t").WithLocation(12, 17),
114838
#pragma warning disable {(int)ErrorCode.
WRN_UnreferencedVarAssg
}
Semantics\NullConditionalAssignmentTests.cs (2)
72
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(7, 16),
81
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(7, 16));
Semantics\OverloadResolutionTests.cs (1)
3236
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "E").WithArguments("E").WithLocation(22, 11));
Semantics\RefFieldTests.cs (9)
13196
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s4").WithArguments("s4").WithLocation(4, 15),
13210
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s4").WithArguments("s4").WithLocation(4, 15)
13251
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s4").WithArguments("s4").WithLocation(4, 24),
13265
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s4").WithArguments("s4").WithLocation(4, 24)
13400
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "scoped").WithArguments("scoped").WithLocation(1, 6));
13424
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "scoped").WithArguments("scoped").WithLocation(1, 11)
13494
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "r1").WithArguments("r1").WithLocation(6, 20)
13558
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "r1").WithArguments("r1").WithLocation(6, 25)
21315
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(2, 5),
Semantics\SemanticAnalyzerTests.cs (3)
146
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(7, 16));
934
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "q").WithArguments("q").WithLocation(6, 16),
1246
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "b").WithArguments("b"));
Semantics\SemanticErrorTests.cs (26)
1708
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x"));
2799
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "d").WithArguments("d").WithLocation(3, 3)
2935
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "p").WithArguments("p")
2943
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "p").WithArguments("p").WithLocation(14, 13)
3702
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(9, 14)
5151
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i")
6470
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "aStruct").WithArguments("aStruct").WithLocation(15, 16),
6480
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "aStruct").WithArguments("aStruct"),
8595
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "myS").WithArguments("myS"));
9186
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(5, 21));
10481
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t2").WithArguments("t2"),
10484
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "t6").WithArguments("t6"),
11677
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "d1").WithArguments("d1").WithLocation(7, 17),
11680
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "f1").WithArguments("f1").WithLocation(8, 15));
12215
new ErrorDescription { Code = (int)ErrorCode.
WRN_UnreferencedVarAssg
, Line = 6, Column = 13, IsWarning = true },
12216
new ErrorDescription { Code = (int)ErrorCode.
WRN_UnreferencedVarAssg
, Line = 6, Column = 20, IsWarning = true }});
12855
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j"));
17100
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x")
19590
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a")
19606
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13));
19622
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 14));
19642
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 12),
19643
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s").WithLocation(7, 16)
19666
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(11, 13)
19686
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 18)
22878
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "d").WithArguments("d"));
Semantics\SpanStackSafetyTests.cs (4)
1366
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local1").WithArguments("local1").WithLocation(13, 19),
1369
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local2").WithArguments("local2").WithLocation(14, 13),
1372
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local2").WithArguments("local2").WithLocation(23, 13),
1378
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "local1").WithArguments("local1").WithLocation(31, 19),
Semantics\TargetTypedDefaultTests.cs (5)
35
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 13),
1459
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(20, 13),
1462
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "p").WithArguments("p").WithLocation(21, 13),
1562
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(20, 13),
1565
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "p").WithArguments("p").WithLocation(21, 13),
Semantics\TopLevelStatementsTests.cs (11)
442
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(2, 5),
463
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(2, 5),
786
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(2, 8),
792
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(3, 8)
979
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(4, 5)
1082
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "await").WithArguments("await").WithLocation(3, 8),
1457
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(2, 8),
1476
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(2, 8),
1505
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(3, 8),
8834
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(2, 5),
9662
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(6, 5)
Semantics\UnsafeTests.cs (2)
10490
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s"));
11832
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "c").WithArguments("c"));
Semantics\Utf8StringsLiteralsTests.cs (2)
2518
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(9, 13),
2521
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(10, 28)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (40)
BadSymbolReference.cs (25)
297
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(9, 16),
300
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(15, 16),
303
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(21, 31),
312
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x4").WithArguments("x4").WithLocation(53, 18),
315
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(65, 20),
321
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(145, 17),
493
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(9, 16),
496
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(15, 16),
499
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(21, 31),
508
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x4").WithArguments("x4").WithLocation(53, 18),
511
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(65, 20),
517
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(145, 17),
609
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(9, 16),
612
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(15, 16),
615
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(21, 31),
618
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x4").WithArguments("x4").WithLocation(53, 18),
621
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(65, 20),
624
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(145, 17),
690
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1").WithLocation(9, 16),
693
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x2").WithArguments("x2").WithLocation(15, 16),
696
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x3").WithArguments("x3").WithLocation(21, 31),
699
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x4").WithArguments("x4").WithLocation(53, 18),
702
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x5").WithArguments("x5").WithLocation(65, 20),
705
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x6").WithArguments("x6").WithLocation(145, 17),
730
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x1").WithArguments("x1")
Compilation\GetSemanticInfoTests.cs (2)
4133
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(8, 13)
4184
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x").WithLocation(8, 13)
Compilation\SemanticModelAPITests.cs (1)
1284
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "c").WithArguments("c"));
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1137
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "a").WithArguments("a").WithLocation(6, 13),
Symbols\Source\EnumTests.cs (1)
632
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s").WithArguments("s"));
Symbols\Source\ExternAliasTests.cs (1)
248
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "d").WithArguments("d")
Symbols\Source\NullablePublicAPITests.cs (2)
1746
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(9, 16));
1760
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "o").WithArguments("o").WithLocation(9, 16),
Symbols\SymbolErrorTests.cs (7)
13489
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(10, 14),
13492
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "c").WithArguments("c").WithLocation(11, 14)
16514
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s1").WithArguments("s1"),
16517
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s3").WithArguments("s3"),
16520
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s4").WithArguments("s4"),
16523
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "s5").WithArguments("s5"));
17917
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "x").WithArguments("x"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (57)
Diagnostics\DiagnosticTest.cs (49)
617
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j"));
625
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j"));
635
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j"));
644
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "j").WithArguments("j"));
728
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
739
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
748
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
781
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
792
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
801
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
837
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
848
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
857
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
898
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
909
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
918
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
956
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
967
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
976
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1012
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1026
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1038
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1079
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1096
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1111
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1153
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1167
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1179
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
1482
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1499
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1513
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1549
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1563
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1599
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1616
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1655
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1669
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1702
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1713
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"),
1775
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1786
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1793
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1824
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1838
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1848
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y"));
1888
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(15, 13));
2078
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(8, 13),
2624
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "y").WithArguments("y").WithLocation(6, 13),
2627
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "z").WithArguments("z").WithLocation(7, 13)
Parsing\FileModifierParsingTests.cs (2)
3235
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "file").WithArguments("file").WithLocation(1, 6)
3299
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "file").WithArguments("file").WithLocation(3, 10)
Parsing\ParserErrorMessageTests.cs (2)
1241
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 13));
3258
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "message").WithArguments("message").WithLocation(8, 22),
Parsing\StatementAttributeParsingTests.cs (4)
6617
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 16));
6862
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 22));
7034
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 27));
7128
Diagnostic(ErrorCode.
WRN_UnreferencedVarAssg
, "i").WithArguments("i").WithLocation(6, 23));