359 references to WRN_UnreferencedVar
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
266
case ErrorCode.
WRN_UnreferencedVar
:
752
or ErrorCode.
WRN_UnreferencedVar
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)
18
case ErrorCode.
WRN_UnreferencedVar
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (16)
BreakingChanges.cs (1)
1472
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "A5").WithArguments("A5"),
CodeGen\CodeGenAsyncIteratorTests.cs (2)
8739
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "await").WithArguments("await").WithLocation(13, 13),
8805
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "await").WithArguments("await").WithLocation(12, 13),
CodeGen\CodeGenDeconstructTests.cs (6)
6484
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "_").WithArguments("_").WithLocation(10, 17)
7096
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "_").WithArguments("_").WithLocation(6, 13)
9716
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(6, 13),
9722
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y2").WithArguments("y2").WithLocation(8, 16),
9754
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y1").WithArguments("y1").WithLocation(7, 16),
9763
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(11, 13));
CodeGen\CodeGenTupleTest.cs (2)
3314
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 15015));
10744
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(6, 39)
CodeGen\CodeGenUsingDeclarationTests.cs (2)
1594
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "obj").WithArguments("obj").WithLocation(1, 33),
1647
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "obj").WithArguments("obj").WithLocation(1, 44),
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (3)
1130
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(14, 13),
1131
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(15, 13),
1132
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(15, 16));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (112)
Diagnostics\GetDiagnosticsTests.cs (2)
640
var expected = Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(11, 13);
694
var expected = Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13);
FlowAnalysis\FlowTests.cs (15)
1116
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1122
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1125
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1131
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1137
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1143
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1149
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1152
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1155
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1158
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1161
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1164
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1167
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"),
1170
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e"));
5206
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 33));
Semantics\ExtensionTests2.cs (1)
2578
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "s2").WithArguments("s2").WithLocation(4, 8),
Semantics\OutVarTests.cs (49)
20734
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "d").WithArguments("d").WithLocation(10, 13),
20737
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(10, 16),
20899
(int)ErrorCode.
WRN_UnreferencedVar
21012
(int)ErrorCode.
WRN_UnreferencedVar
21112
(int)ErrorCode.
WRN_UnreferencedVar
,
21210
(int)ErrorCode.
WRN_UnreferencedVar
,
21345
(int)ErrorCode.
WRN_UnreferencedVar
21572
(int)ErrorCode.
WRN_UnreferencedVar
,
21770
(int)ErrorCode.
WRN_UnreferencedVar
,
21971
(int)ErrorCode.
WRN_UnreferencedVar
,
22122
(int)ErrorCode.
WRN_UnreferencedVar
,
22218
(int)ErrorCode.
WRN_UnreferencedVar
,
22386
(int)ErrorCode.
WRN_UnreferencedVar
,
22552
(int)ErrorCode.
WRN_UnreferencedVar
,
23465
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(7, 8),
25602
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
25727
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
25914
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
26083
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8)
26320
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
26463
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
26603
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
26747
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
26929
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
27060
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
27209
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8)
27362
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8)
28342
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
28493
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
28750
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
28916
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
29067
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
29279
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
29455
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
29748
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
29949
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
30177
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
30189
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x6").WithArguments("x6").WithLocation(19, 10),
30349
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
30361
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x6").WithArguments("x6").WithLocation(19, 10),
31790
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(3, 6),
31793
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(3, 9),
31883
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(3, 6),
31886
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(3, 9),
34257
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(7, 27),
34260
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "_1").WithArguments("_1").WithLocation(7, 36),
34263
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(8, 27),
34266
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(8, 36)
34484
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(21, 46)
Semantics\PatternMatchingTests.cs (1)
4879
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "_").WithArguments("_").WithLocation(6, 41),
Semantics\PatternMatchingTests_Global.cs (30)
111
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
233
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
410
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
574
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8)
795
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
933
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1065
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1197
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1365
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1491
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1626
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
1774
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
2721
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
2867
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
3112
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
3271
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
3417
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
3619
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
3790
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
4021
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
4219
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 8),
4435
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
4447
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x6").WithArguments("x6").WithLocation(19, 10),
4602
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(10, 8),
4614
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x6").WithArguments("x6").WithLocation(19, 10),
5954
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(3, 6),
5957
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(3, 9),
6044
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(3, 6),
6047
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(3, 9),
6751
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(7, 8),
Semantics\PatternMatchingTests_Scope.cs (13)
11786
(int)ErrorCode.
WRN_UnreferencedVar
11877
(int)ErrorCode.
WRN_UnreferencedVar
11971
(int)ErrorCode.
WRN_UnreferencedVar
,
12063
(int)ErrorCode.
WRN_UnreferencedVar
,
12186
(int)ErrorCode.
WRN_UnreferencedVar
12401
(int)ErrorCode.
WRN_UnreferencedVar
,
12594
(int)ErrorCode.
WRN_UnreferencedVar
,
12792
(int)ErrorCode.
WRN_UnreferencedVar
,
12937
(int)ErrorCode.
WRN_UnreferencedVar
,
13027
(int)ErrorCode.
WRN_UnreferencedVar
,
13189
(int)ErrorCode.
WRN_UnreferencedVar
,
13349
(int)ErrorCode.
WRN_UnreferencedVar
,
13916
int[] exclude = new int[] { (int)ErrorCode.ERR_NoImplicitConv, (int)ErrorCode.
WRN_UnreferencedVar
};
Semantics\RecordTests.cs (1)
2577
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "with").WithArguments("with").WithLocation(7, 11),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (37)
IOperation\IOperationTests_IAwaitExpression.cs (1)
226
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "t").WithArguments("t").WithLocation(9, 25)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
506
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(8, 49)
IOperation\IOperationTests_InvalidStatement.cs (1)
63
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(8, 23)
IOperation\IOperationTests_IPatternSwitchCase.cs (1)
635
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(9, 49)
IOperation\IOperationTests_IVariableDeclaration.cs (26)
47
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i1").WithArguments("i1").WithLocation(6, 23)
149
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i1").WithArguments("i1").WithLocation(6, 23),
152
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i2").WithArguments("i2").WithLocation(6, 27)
271
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i").WithArguments("i").WithLocation(6, 23)
452
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(6, 29)
493
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(6, 29),
496
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(6, 32)
590
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 23)
749
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 27)
786
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 29)
828
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 28)
899
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 38)
991
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 38)
1044
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 39)
1097
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(6, 42)
1153
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(6, 43)
1194
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 33)
1237
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 38)
1274
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(8, 24)
1325
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 35)
1385
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 52)
2689
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "j").WithArguments("j").WithLocation(6, 31)
3059
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i1").WithArguments("i1").WithLocation(6, 29)
3100
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i1").WithArguments("i1").WithLocation(6, 29),
3103
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i2").WithArguments("i2").WithLocation(6, 33)
3147
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i1").WithArguments("i1").WithLocation(6, 29)
IOperation\IOperationTests_TryCatch.cs (7)
194
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 38)
311
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 38)
381
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 38)
710
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(11, 26)
798
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 30)
6422
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(10, 46)
6519
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(12, 50)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (68)
Semantics\BindingAsyncTests.cs (1)
3244
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "tr").WithArguments("tr"));
Semantics\ColorColorTests.cs (11)
169
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Color").WithArguments("Color"));
764
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(18, 15),
767
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Q").WithArguments("Q").WithLocation(19, 15)
803
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(18, 15),
806
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Q").WithArguments("Q").WithLocation(19, 15)
842
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(18, 15),
845
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Q").WithArguments("Q").WithLocation(19, 15)
881
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(18, 15),
884
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Q").WithArguments("Q").WithLocation(19, 15)
1327
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(16, 15)
1386
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "E").WithArguments("E").WithLocation(16, 15)
Semantics\LocalFunctionTests.cs (6)
3065
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "T").WithArguments("T").WithLocation(6, 13));
3071
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "T").WithArguments("T").WithLocation(6, 13));
3120
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Conflict").WithArguments("Conflict").WithLocation(6, 13),
3147
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Conflict").WithArguments("Conflict").WithLocation(7, 13),
3993
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Goo").WithArguments("Goo").WithLocation(6, 13),
3996
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Bar").WithArguments("Bar").WithLocation(13, 13)
Semantics\NameCollisionTests.cs (8)
1785
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(8, 13),
1794
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(18, 13)
1803
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(8, 13),
1809
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(18, 13)
1848
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(9, 13),
1857
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(19, 13)
1866
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(9, 13),
1872
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(19, 13)
Semantics\NullableReferenceTypesTests.cs (6)
1155
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "y").WithArguments("y").WithLocation(6, 16),
4107
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(12, 34),
4119
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(35, 33),
114925
#pragma warning disable {(int)ErrorCode.
WRN_UnreferencedVar
}
161397
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(5, 54)
161424
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(5, 54)
Semantics\OverloadResolutionPerfTests.cs (1)
850
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "tmp2").WithArguments("tmp2").WithLocation(9, 13));
Semantics\RefFieldTests.cs (12)
11834
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "record").WithArguments("record").WithLocation(3, 17),
11880
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "record").WithArguments("record").WithLocation(3, 17),
13124
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "R").WithArguments("R").WithLocation(6, 23),
13136
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "scoped").WithArguments("scoped").WithLocation(7, 16),
13162
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "R").WithArguments("R").WithLocation(1, 15),
13171
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "scoped").WithArguments("scoped").WithLocation(2, 8),
13815
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(6, 38),
13849
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(6, 43),
18194
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "S").WithArguments("S").WithLocation(6, 29),
18212
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "S").WithArguments("S").WithLocation(7, 36),
22121
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "R").WithArguments("R").WithLocation(5, 20),
22151
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "R").WithArguments("R").WithLocation(5, 27),
Semantics\RefLocalsAndReturnsTests.cs (2)
106
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "rx").WithArguments("rx").WithLocation(7, 22));
1652
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 17)
Semantics\SemanticAnalyzerTests.cs (8)
209
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x1").WithArguments("x1").WithLocation(7, 12),
212
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x2").WithArguments("x2").WithLocation(8, 14),
215
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x3").WithArguments("x3").WithLocation(9, 15),
218
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x4").WithArguments("x4").WithLocation(10, 17));
937
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i").WithArguments("i").WithLocation(7, 13),
940
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "j").WithArguments("j").WithLocation(8, 13),
943
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "k").WithArguments("k").WithLocation(9, 14),
946
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i").WithArguments("i").WithLocation(9, 17));
Semantics\SemanticErrorTests.cs (11)
2732
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(2, 5)
4790
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "s").WithArguments("s")
9430
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(6, 16));
12181
new ErrorDescription { Code = (int)ErrorCode.
WRN_UnreferencedVar
, Line = 6, Column = 13, IsWarning = true }});
15460
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e")
19293
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "j").WithArguments("j").WithLocation(11, 13),
19294
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(13, 13));
19313
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(7, 42),
19314
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(8, 37));
24115
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(11, 17),
24118
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(14, 17)
Semantics\TopLevelStatementsTests.cs (1)
4323
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "I1").WithArguments("I1").WithLocation(4, 6),
Semantics\TryCatchTests.cs (1)
77
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "e").WithArguments("e").WithLocation(9, 20));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\FunctionPointerTypeSymbolTests.cs (4)
1112
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local1").WithArguments("local1").WithLocation(8, 25),
1118
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local2").WithArguments("local2").WithLocation(9, 37));
1143
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local").WithArguments("local").WithLocation(7, 27));
1255
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "d").WithArguments("d").WithLocation(10, 24));
Symbols\SymbolErrorTests.cs (3)
1096
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "value__").WithArguments("value__"),
2498
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(7, 14),
2507
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "value").WithArguments("value").WithLocation(20, 17));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (115)
Diagnostics\DiagnosticTest.cs (86)
614
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
632
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
641
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
677
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
685
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
691
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
725
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
736
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
745
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
784
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
795
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
804
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
840
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
851
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
860
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
895
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
906
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
915
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
953
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
964
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
973
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1009
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1015
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13));
1023
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true),
1029
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true));
1035
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1041
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13));
1076
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1082
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13),
1085
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "w").WithArguments("w").WithLocation(12, 13));
1093
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true),
1099
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true),
1102
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "w").WithArguments("w").WithLocation(12, 13).WithWarningAsError(true));
1108
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1114
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13),
1117
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "w").WithArguments("w").WithLocation(12, 13));
1150
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1156
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13));
1164
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true),
1170
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true));
1176
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(7, 13),
1182
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(10, 13));
1221
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1229
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1235
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1274
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1282
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1288
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1328
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1336
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1342
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1429
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1437
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1443
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1479
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1485
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1496
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1502
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1510
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1516
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1546
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1552
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1560
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1566
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1596
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1602
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1613
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1619
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1652
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1658
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1666
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1672
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1705
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
1716
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
1772
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1783
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1821
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
1835
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
1885
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithLocation(14, 13),
2081
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithLocation(12, 13));
2140
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
2176
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x")
2245
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x"),
2248
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z"));
2265
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "x").WithArguments("x").WithWarningAsError(true),
2268
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "z").WithArguments("z").WithWarningAsError(true));
Parsing\DeclarationScopeParsingTests.cs (3)
3286
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "A").WithArguments("A").WithLocation(2, 15));
3299
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "A").WithArguments("A").WithLocation(2, 15));
3309
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "A").WithArguments("A").WithLocation(2, 15));
Parsing\FileModifierParsingTests.cs (8)
144
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(1, 9),
284
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "partial").WithArguments("partial").WithLocation(1, 6),
346
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "partial").WithArguments("partial").WithLocation(1, 6),
409
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(1, 9),
3031
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(3, 10)
3092
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(3, 9)
3153
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(1, 6)
3194
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "file").WithArguments("file").WithLocation(1, 5)
Parsing\FunctionPointerTests.cs (1)
531
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "ptr").WithArguments("ptr").WithLocation(1, 46));
Parsing\LocalFunctionParsingTests.cs (3)
982
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local").WithArguments("local").WithLocation(6, 20));
1067
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local1").WithArguments("local1").WithLocation(6, 20),
1070
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "local2").WithArguments("local2").WithLocation(6, 28));
Parsing\ParserErrorMessageTests.cs (8)
705
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "myarray").WithArguments("myarray").WithLocation(7, 16),
720
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(9, 20),
726
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "d").WithArguments("d").WithLocation(10, 24),
1054
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "myarray").WithArguments("myarray").WithLocation(6, 13),
1057
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "m").WithArguments("m").WithLocation(7, 17),
1060
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "b").WithArguments("b").WithLocation(8, 14),
1063
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "d").WithArguments("d").WithLocation(9, 16)
2484
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "j").WithArguments("j").WithLocation(6, 39));
Parsing\RecordParsing.cs (2)
276
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "Point").WithArguments("Point").WithLocation(1, 8));
3887
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "R").WithArguments("R").WithLocation(1, 12));
Parsing\StatementAttributeParsingTests.cs (4)
4253
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "a").WithArguments("a").WithLocation(6, 18));
6443
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i").WithArguments("i").WithLocation(6, 16));
6527
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "i").WithArguments("i").WithLocation(6, 16),
6530
Diagnostic(ErrorCode.
WRN_UnreferencedVar
, "j").WithArguments("j").WithLocation(6, 19));