359 references to WRN_UnreferencedVar
Microsoft.CodeAnalysis.CSharp (4)
Errors\ErrorFacts.cs (2)
266case ErrorCode.WRN_UnreferencedVar: 754or ErrorCode.WRN_UnreferencedVar
FlowAnalysis\DefiniteAssignment.cs (1)
2283Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
Generated\ErrorFacts.Generated.cs (1)
18case ErrorCode.WRN_UnreferencedVar:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (16)
BreakingChanges.cs (1)
1472Diagnostic(ErrorCode.WRN_UnreferencedVar, "A5").WithArguments("A5"),
CodeGen\CodeGenAsyncIteratorTests.cs (2)
8879Diagnostic(ErrorCode.WRN_UnreferencedVar, "await").WithArguments("await").WithLocation(12, 13), 8944Diagnostic(ErrorCode.WRN_UnreferencedVar, "await").WithArguments("await").WithLocation(11, 13),
CodeGen\CodeGenDeconstructTests.cs (6)
6484Diagnostic(ErrorCode.WRN_UnreferencedVar, "_").WithArguments("_").WithLocation(10, 17) 7096Diagnostic(ErrorCode.WRN_UnreferencedVar, "_").WithArguments("_").WithLocation(6, 13) 9716Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(6, 13), 9722Diagnostic(ErrorCode.WRN_UnreferencedVar, "y2").WithArguments("y2").WithLocation(8, 16), 9754Diagnostic(ErrorCode.WRN_UnreferencedVar, "y1").WithArguments("y1").WithLocation(7, 16), 9763Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(11, 13));
CodeGen\CodeGenTupleTest.cs (2)
3314Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 15015)); 10744Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(6, 39)
CodeGen\CodeGenUsingDeclarationTests.cs (2)
1594Diagnostic(ErrorCode.WRN_UnreferencedVar, "obj").WithArguments("obj").WithLocation(1, 33), 1647Diagnostic(ErrorCode.WRN_UnreferencedVar, "obj").WithArguments("obj").WithLocation(1, 44),
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (3)
1130Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(14, 13), 1131Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(15, 13), 1132Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(15, 16));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (112)
Diagnostics\GetDiagnosticsTests.cs (2)
640var expected = Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(11, 13); 694var expected = Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13);
FlowAnalysis\FlowTests.cs (15)
1116Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1122Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1125Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1131Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1137Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1143Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1149Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1152Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1155Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1158Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1161Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1164Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1167Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e"), 1170Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e")); 5224Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 33));
Semantics\ExtensionTests2.cs (1)
2903Diagnostic(ErrorCode.WRN_UnreferencedVar, "s2").WithArguments("s2").WithLocation(4, 8),
Semantics\OutVarTests.cs (49)
20723Diagnostic(ErrorCode.WRN_UnreferencedVar, "d").WithArguments("d").WithLocation(10, 13), 20726Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(10, 16), 20888(int)ErrorCode.WRN_UnreferencedVar 21001(int)ErrorCode.WRN_UnreferencedVar 21101(int)ErrorCode.WRN_UnreferencedVar, 21199(int)ErrorCode.WRN_UnreferencedVar, 21334(int)ErrorCode.WRN_UnreferencedVar 21561(int)ErrorCode.WRN_UnreferencedVar, 21759(int)ErrorCode.WRN_UnreferencedVar, 21960(int)ErrorCode.WRN_UnreferencedVar, 22111(int)ErrorCode.WRN_UnreferencedVar, 22207(int)ErrorCode.WRN_UnreferencedVar, 22375(int)ErrorCode.WRN_UnreferencedVar, 22541(int)ErrorCode.WRN_UnreferencedVar, 23454Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(7, 8), 25591Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 25716Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 25903Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 26072Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8) 26309Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 26452Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 26592Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 26736Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 26918Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 27049Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 27198Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8) 27351Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8) 28331Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 28482Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 28739Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 28905Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 29056Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 29268Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 29444Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 29737Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 29938Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 30166Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 30178Diagnostic(ErrorCode.WRN_UnreferencedVar, "x6").WithArguments("x6").WithLocation(19, 10), 30338Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 30350Diagnostic(ErrorCode.WRN_UnreferencedVar, "x6").WithArguments("x6").WithLocation(19, 10), 31779Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(3, 6), 31782Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(3, 9), 31872Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(3, 6), 31875Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(3, 9), 34246Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(7, 27), 34249Diagnostic(ErrorCode.WRN_UnreferencedVar, "_1").WithArguments("_1").WithLocation(7, 36), 34252Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(8, 27), 34255Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(8, 36) 34473Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(21, 46)
Semantics\PatternMatchingTests.cs (1)
4879Diagnostic(ErrorCode.WRN_UnreferencedVar, "_").WithArguments("_").WithLocation(6, 41),
Semantics\PatternMatchingTests_Global.cs (30)
112Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 234Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 411Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 575Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8) 796Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 934Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1066Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1198Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1366Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1492Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1627Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 1775Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 2722Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 2868Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 3113Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 3272Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 3418Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 3620Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 3791Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 4022Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 4220Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 8), 4436Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 4448Diagnostic(ErrorCode.WRN_UnreferencedVar, "x6").WithArguments("x6").WithLocation(19, 10), 4603Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(10, 8), 4615Diagnostic(ErrorCode.WRN_UnreferencedVar, "x6").WithArguments("x6").WithLocation(19, 10), 5955Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(3, 6), 5958Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(3, 9), 6045Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(3, 6), 6048Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(3, 9), 6752Diagnostic(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, 13916int[] exclude = new int[] { (int)ErrorCode.ERR_NoImplicitConv, (int)ErrorCode.WRN_UnreferencedVar };
Semantics\RecordTests.cs (1)
2577Diagnostic(ErrorCode.WRN_UnreferencedVar, "with").WithArguments("with").WithLocation(7, 11),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (37)
IOperation\IOperationTests_IAwaitExpression.cs (1)
226Diagnostic(ErrorCode.WRN_UnreferencedVar, "t").WithArguments("t").WithLocation(9, 25)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
506Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(8, 49)
IOperation\IOperationTests_InvalidStatement.cs (1)
63Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(8, 23)
IOperation\IOperationTests_IPatternSwitchCase.cs (1)
635Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(9, 49)
IOperation\IOperationTests_IVariableDeclaration.cs (26)
47Diagnostic(ErrorCode.WRN_UnreferencedVar, "i1").WithArguments("i1").WithLocation(6, 23) 149Diagnostic(ErrorCode.WRN_UnreferencedVar, "i1").WithArguments("i1").WithLocation(6, 23), 152Diagnostic(ErrorCode.WRN_UnreferencedVar, "i2").WithArguments("i2").WithLocation(6, 27) 271Diagnostic(ErrorCode.WRN_UnreferencedVar, "i").WithArguments("i").WithLocation(6, 23) 452Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(6, 29) 493Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(6, 29), 496Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(6, 32) 590Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 23) 749Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 27) 786Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 29) 828Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 28) 899Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 38) 991Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 38) 1044Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 39) 1097Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(6, 42) 1153Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(6, 43) 1194Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 33) 1237Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 38) 1274Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(8, 24) 1325Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 35) 1385Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 52) 2689Diagnostic(ErrorCode.WRN_UnreferencedVar, "j").WithArguments("j").WithLocation(6, 31) 3059Diagnostic(ErrorCode.WRN_UnreferencedVar, "i1").WithArguments("i1").WithLocation(6, 29) 3100Diagnostic(ErrorCode.WRN_UnreferencedVar, "i1").WithArguments("i1").WithLocation(6, 29), 3103Diagnostic(ErrorCode.WRN_UnreferencedVar, "i2").WithArguments("i2").WithLocation(6, 33) 3147Diagnostic(ErrorCode.WRN_UnreferencedVar, "i1").WithArguments("i1").WithLocation(6, 29)
IOperation\IOperationTests_TryCatch.cs (7)
194Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 38) 311Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 38) 381Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 38) 710Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(11, 26) 798Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 30) 6422Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(10, 46) 6519Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(12, 50)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (68)
Semantics\BindingAsyncTests.cs (1)
3222Diagnostic(ErrorCode.WRN_UnreferencedVar, "tr").WithArguments("tr"));
Semantics\ColorColorTests.cs (11)
169Diagnostic(ErrorCode.WRN_UnreferencedVar, "Color").WithArguments("Color")); 764Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(18, 15), 767Diagnostic(ErrorCode.WRN_UnreferencedVar, "Q").WithArguments("Q").WithLocation(19, 15) 803Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(18, 15), 806Diagnostic(ErrorCode.WRN_UnreferencedVar, "Q").WithArguments("Q").WithLocation(19, 15) 842Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(18, 15), 845Diagnostic(ErrorCode.WRN_UnreferencedVar, "Q").WithArguments("Q").WithLocation(19, 15) 881Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(18, 15), 884Diagnostic(ErrorCode.WRN_UnreferencedVar, "Q").WithArguments("Q").WithLocation(19, 15) 1327Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(16, 15) 1386Diagnostic(ErrorCode.WRN_UnreferencedVar, "E").WithArguments("E").WithLocation(16, 15)
Semantics\LocalFunctionTests.cs (6)
3370Diagnostic(ErrorCode.WRN_UnreferencedVar, "T").WithArguments("T").WithLocation(6, 13)); 3376Diagnostic(ErrorCode.WRN_UnreferencedVar, "T").WithArguments("T").WithLocation(6, 13)); 3425Diagnostic(ErrorCode.WRN_UnreferencedVar, "Conflict").WithArguments("Conflict").WithLocation(6, 13), 3452Diagnostic(ErrorCode.WRN_UnreferencedVar, "Conflict").WithArguments("Conflict").WithLocation(7, 13), 4298Diagnostic(ErrorCode.WRN_UnreferencedVar, "Goo").WithArguments("Goo").WithLocation(6, 13), 4301Diagnostic(ErrorCode.WRN_UnreferencedVar, "Bar").WithArguments("Bar").WithLocation(13, 13)
Semantics\NameCollisionTests.cs (8)
1785Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(8, 13), 1794Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(18, 13) 1803Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(8, 13), 1809Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(18, 13) 1848Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(9, 13), 1857Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(19, 13) 1866Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(9, 13), 1872Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(19, 13)
Semantics\NullableReferenceTypesTests.cs (6)
1155Diagnostic(ErrorCode.WRN_UnreferencedVar, "y").WithArguments("y").WithLocation(6, 16), 4114Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(12, 34), 4126Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(35, 33), 115009#pragma warning disable {(int)ErrorCode.WRN_UnreferencedVar} 161512Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(5, 54) 161536Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(5, 54)
Semantics\OverloadResolutionPerfTests.cs (1)
850Diagnostic(ErrorCode.WRN_UnreferencedVar, "tmp2").WithArguments("tmp2").WithLocation(9, 13));
Semantics\RefFieldTests.cs (12)
11834Diagnostic(ErrorCode.WRN_UnreferencedVar, "record").WithArguments("record").WithLocation(3, 17), 11880Diagnostic(ErrorCode.WRN_UnreferencedVar, "record").WithArguments("record").WithLocation(3, 17), 13124Diagnostic(ErrorCode.WRN_UnreferencedVar, "R").WithArguments("R").WithLocation(6, 23), 13136Diagnostic(ErrorCode.WRN_UnreferencedVar, "scoped").WithArguments("scoped").WithLocation(7, 16), 13162Diagnostic(ErrorCode.WRN_UnreferencedVar, "R").WithArguments("R").WithLocation(1, 15), 13171Diagnostic(ErrorCode.WRN_UnreferencedVar, "scoped").WithArguments("scoped").WithLocation(2, 8), 13815Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(6, 38), 13849Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(6, 43), 18194Diagnostic(ErrorCode.WRN_UnreferencedVar, "S").WithArguments("S").WithLocation(6, 29), 18212Diagnostic(ErrorCode.WRN_UnreferencedVar, "S").WithArguments("S").WithLocation(7, 36), 22121Diagnostic(ErrorCode.WRN_UnreferencedVar, "R").WithArguments("R").WithLocation(5, 20), 22151Diagnostic(ErrorCode.WRN_UnreferencedVar, "R").WithArguments("R").WithLocation(5, 27),
Semantics\RefLocalsAndReturnsTests.cs (2)
106Diagnostic(ErrorCode.WRN_UnreferencedVar, "rx").WithArguments("rx").WithLocation(7, 22)); 1652Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 17)
Semantics\SemanticAnalyzerTests.cs (8)
209Diagnostic(ErrorCode.WRN_UnreferencedVar, "x1").WithArguments("x1").WithLocation(7, 12), 212Diagnostic(ErrorCode.WRN_UnreferencedVar, "x2").WithArguments("x2").WithLocation(8, 14), 215Diagnostic(ErrorCode.WRN_UnreferencedVar, "x3").WithArguments("x3").WithLocation(9, 15), 218Diagnostic(ErrorCode.WRN_UnreferencedVar, "x4").WithArguments("x4").WithLocation(10, 17)); 937Diagnostic(ErrorCode.WRN_UnreferencedVar, "i").WithArguments("i").WithLocation(7, 13), 940Diagnostic(ErrorCode.WRN_UnreferencedVar, "j").WithArguments("j").WithLocation(8, 13), 943Diagnostic(ErrorCode.WRN_UnreferencedVar, "k").WithArguments("k").WithLocation(9, 14), 946Diagnostic(ErrorCode.WRN_UnreferencedVar, "i").WithArguments("i").WithLocation(9, 17));
Semantics\SemanticErrorTests.cs (11)
2732Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(2, 5) 4835Diagnostic(ErrorCode.WRN_UnreferencedVar, "s").WithArguments("s") 9475Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(6, 16)); 12226new ErrorDescription { Code = (int)ErrorCode.WRN_UnreferencedVar, Line = 6, Column = 13, IsWarning = true }}); 15507Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e") 19340Diagnostic(ErrorCode.WRN_UnreferencedVar, "j").WithArguments("j").WithLocation(11, 13), 19341Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(13, 13)); 19360Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(7, 42), 19361Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(8, 37)); 24162Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(11, 17), 24165Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(14, 17)
Semantics\TopLevelStatementsTests.cs (1)
4359Diagnostic(ErrorCode.WRN_UnreferencedVar, "I1").WithArguments("I1").WithLocation(4, 6),
Semantics\TryCatchTests.cs (1)
77Diagnostic(ErrorCode.WRN_UnreferencedVar, "e").WithArguments("e").WithLocation(9, 20));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\FunctionPointerTypeSymbolTests.cs (4)
1112Diagnostic(ErrorCode.WRN_UnreferencedVar, "local1").WithArguments("local1").WithLocation(8, 25), 1118Diagnostic(ErrorCode.WRN_UnreferencedVar, "local2").WithArguments("local2").WithLocation(9, 37)); 1143Diagnostic(ErrorCode.WRN_UnreferencedVar, "local").WithArguments("local").WithLocation(7, 27)); 1255Diagnostic(ErrorCode.WRN_UnreferencedVar, "d").WithArguments("d").WithLocation(10, 24));
Symbols\SymbolErrorTests.cs (3)
1096Diagnostic(ErrorCode.WRN_UnreferencedVar, "value__").WithArguments("value__"), 2498Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(7, 14), 2507Diagnostic(ErrorCode.WRN_UnreferencedVar, "value").WithArguments("value").WithLocation(20, 17));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (115)
Diagnostics\DiagnosticTest.cs (86)
613Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 631Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 640Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 676Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 684Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 690Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 724Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 735Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 744Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 783Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 794Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 803Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 839Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 850Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 859Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 894Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 905Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 914Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 952Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 963Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 972Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1008Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1014Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13)); 1022Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true), 1028Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true)); 1034Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1040Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13)); 1075Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1081Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13), 1084Diagnostic(ErrorCode.WRN_UnreferencedVar, "w").WithArguments("w").WithLocation(12, 13)); 1092Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true), 1098Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true), 1101Diagnostic(ErrorCode.WRN_UnreferencedVar, "w").WithArguments("w").WithLocation(12, 13).WithWarningAsError(true)); 1107Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1113Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13), 1116Diagnostic(ErrorCode.WRN_UnreferencedVar, "w").WithArguments("w").WithLocation(12, 13)); 1149Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1155Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13)); 1163Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13).WithWarningAsError(true), 1169Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13).WithWarningAsError(true)); 1175Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(7, 13), 1181Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(10, 13)); 1220Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1228Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1234Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1273Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1281Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1287Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1327Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1335Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1341Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1428Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1436Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1442Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1478Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1484Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1495Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1501Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1509Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1515Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1545Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1551Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1559Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1565Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1595Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1601Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1612Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1618Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1651Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1657Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1665Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1671Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1704Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 1715Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true)); 1771Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1782Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1820Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 1834Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 1884Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithLocation(14, 13), 2080Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithLocation(12, 13)); 2139Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 2175Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x") 2244Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x"), 2247Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z")); 2264Diagnostic(ErrorCode.WRN_UnreferencedVar, "x").WithArguments("x").WithWarningAsError(true), 2267Diagnostic(ErrorCode.WRN_UnreferencedVar, "z").WithArguments("z").WithWarningAsError(true));
Parsing\DeclarationScopeParsingTests.cs (3)
3286Diagnostic(ErrorCode.WRN_UnreferencedVar, "A").WithArguments("A").WithLocation(2, 15)); 3299Diagnostic(ErrorCode.WRN_UnreferencedVar, "A").WithArguments("A").WithLocation(2, 15)); 3309Diagnostic(ErrorCode.WRN_UnreferencedVar, "A").WithArguments("A").WithLocation(2, 15));
Parsing\FileModifierParsingTests.cs (8)
144Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(1, 9), 284Diagnostic(ErrorCode.WRN_UnreferencedVar, "partial").WithArguments("partial").WithLocation(1, 6), 346Diagnostic(ErrorCode.WRN_UnreferencedVar, "partial").WithArguments("partial").WithLocation(1, 6), 409Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(1, 9), 3028Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(3, 10) 3089Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(3, 9) 3150Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(1, 6) 3191Diagnostic(ErrorCode.WRN_UnreferencedVar, "file").WithArguments("file").WithLocation(1, 5)
Parsing\FunctionPointerTests.cs (1)
531Diagnostic(ErrorCode.WRN_UnreferencedVar, "ptr").WithArguments("ptr").WithLocation(1, 46));
Parsing\LocalFunctionParsingTests.cs (3)
982Diagnostic(ErrorCode.WRN_UnreferencedVar, "local").WithArguments("local").WithLocation(6, 20)); 1067Diagnostic(ErrorCode.WRN_UnreferencedVar, "local1").WithArguments("local1").WithLocation(6, 20), 1070Diagnostic(ErrorCode.WRN_UnreferencedVar, "local2").WithArguments("local2").WithLocation(6, 28));
Parsing\ParserErrorMessageTests.cs (8)
705Diagnostic(ErrorCode.WRN_UnreferencedVar, "myarray").WithArguments("myarray").WithLocation(7, 16), 720Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(9, 20), 726Diagnostic(ErrorCode.WRN_UnreferencedVar, "d").WithArguments("d").WithLocation(10, 24), 1054Diagnostic(ErrorCode.WRN_UnreferencedVar, "myarray").WithArguments("myarray").WithLocation(6, 13), 1057Diagnostic(ErrorCode.WRN_UnreferencedVar, "m").WithArguments("m").WithLocation(7, 17), 1060Diagnostic(ErrorCode.WRN_UnreferencedVar, "b").WithArguments("b").WithLocation(8, 14), 1063Diagnostic(ErrorCode.WRN_UnreferencedVar, "d").WithArguments("d").WithLocation(9, 16) 2484Diagnostic(ErrorCode.WRN_UnreferencedVar, "j").WithArguments("j").WithLocation(6, 39));
Parsing\RecordParsing.cs (2)
276Diagnostic(ErrorCode.WRN_UnreferencedVar, "Point").WithArguments("Point").WithLocation(1, 8)); 3887Diagnostic(ErrorCode.WRN_UnreferencedVar, "R").WithArguments("R").WithLocation(1, 12));
Parsing\StatementAttributeParsingTests.cs (4)
4253Diagnostic(ErrorCode.WRN_UnreferencedVar, "a").WithArguments("a").WithLocation(6, 18)); 6443Diagnostic(ErrorCode.WRN_UnreferencedVar, "i").WithArguments("i").WithLocation(6, 16)); 6527Diagnostic(ErrorCode.WRN_UnreferencedVar, "i").WithArguments("i").WithLocation(6, 16), 6530Diagnostic(ErrorCode.WRN_UnreferencedVar, "j").WithArguments("j").WithLocation(6, 19));