282 references to WRN_AttributeLocationOnBadDeclaration
Microsoft.CodeAnalysis.CSharp (6)
Compiler\MethodCompiler.cs (1)
2270
diagnostics.DiagnosticBag!.AsEnumerable().Any(d => d.Code == (int)ErrorCode.
WRN_AttributeLocationOnBadDeclaration
))
Errors\ErrorFacts.cs (2)
338
case ErrorCode.
WRN_AttributeLocationOnBadDeclaration
:
1019
or ErrorCode.
WRN_AttributeLocationOnBadDeclaration
Generated\ErrorFacts.Generated.cs (1)
52
case ErrorCode.
WRN_AttributeLocationOnBadDeclaration
:
Symbols\Symbol_Attributes.cs (1)
739
diagnostics.Add(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
,
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
185
diagnostics.Add(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (251)
Attributes\AttributeTests.cs (8)
2374
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(9, 6),
2377
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(6, 6)
2398
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(6, 21),
2401
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(7, 22),
2404
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(8, 22)
2569
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(10, 6),
2575
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(7, 6)
6172
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"));
Attributes\AttributeTests_Locations.cs (185)
104
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
106
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
108
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
110
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
112
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
114
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
116
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
118
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
120
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
152
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
154
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
156
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
158
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
160
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
162
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
164
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
166
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
168
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
200
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
202
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
204
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
206
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
208
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
210
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
212
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
214
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
216
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
248
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
250
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
252
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
254
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
256
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
258
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
260
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
262
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
264
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
296
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
298
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
300
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
302
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
304
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
306
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
308
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
310
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
312
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
344
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type"),
346
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type"),
348
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type"),
350
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type"),
352
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type"),
354
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type"),
356
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type"),
358
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type"),
360
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type"),
390
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "type, return"),
392
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "type, return"),
394
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type, return"),
396
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "type, return"),
398
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "type, return"),
400
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "type, return"),
402
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "type, return"),
404
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "type, return"),
437
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, return"),
439
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, return"),
441
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, return"),
443
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return"),
445
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, return"),
447
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, return"),
449
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return"),
451
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, return"),
484
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "field"),
486
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "field"),
488
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "field"),
490
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "field"),
492
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "field"),
494
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "field"),
496
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "field"),
498
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "field"),
500
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "field"),
535
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "field"),
537
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "field"),
539
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "field"),
541
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "field"),
543
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "field"),
545
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "field"),
547
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "field"),
549
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "field"),
551
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "field"),
584
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "field, property").WithLocation(10, 6),
586
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "field, property").WithLocation(11, 6),
588
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "field, property").WithLocation(12, 6),
590
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "field, property").WithLocation(13, 6),
592
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "field, property").WithLocation(16, 6),
594
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "field, property").WithLocation(17, 6),
596
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "field, property").WithLocation(18, 6),
598
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "field, property").WithLocation(19, 6),
637
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, return").WithLocation(12, 10),
640
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, return").WithLocation(13, 10),
643
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, return").WithLocation(14, 10),
646
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(16, 10),
649
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, return").WithLocation(17, 10),
652
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, return").WithLocation(18, 10),
655
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return").WithLocation(20, 10),
658
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, return").WithLocation(21, 10),
698
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, param, return").WithLocation(14, 10),
701
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, param, return").WithLocation(15, 10),
704
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, param, return").WithLocation(16, 10),
707
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(18, 10),
710
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, param, return").WithLocation(19, 10),
713
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return").WithLocation(20, 10),
716
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, param, return").WithLocation(23, 10),
750
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, field, event"),
752
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, field, event"),
754
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, field, event"),
756
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, field, event"),
758
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, field, event"),
760
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, field, event"),
762
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, field, event"),
797
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, event"),
799
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, event"),
801
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, event"),
803
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, event"),
805
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, event"),
807
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, event"),
809
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event"),
811
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, event"),
844
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "event"),
846
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "event"),
848
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "event"),
850
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event"),
852
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "event"),
854
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "event"),
856
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "event"),
858
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "event"),
860
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "event"),
898
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, param, return"),
900
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, param, return"),
902
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, param, return"),
904
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return"),
906
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, param, return"),
908
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return"),
910
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, param, return"),
948
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "method, param, return"),
950
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "method, param, return"),
952
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "method, param, return"),
954
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return"),
956
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "method, param, return"),
958
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return"),
960
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "method, param, return"),
995
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "typevar"),
997
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "typevar"),
999
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "typevar"),
1001
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "typevar"),
1003
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "typevar"),
1005
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "typevar"),
1007
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "typevar"),
1009
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "typevar"),
1011
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "typevar"),
1046
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "param"),
1048
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "param"),
1050
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "param"),
1052
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "param"),
1054
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param"),
1056
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param"),
1058
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "param"),
1060
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "param"),
1062
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "param"),
1094
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "param"),
1096
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "param"),
1098
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "param"),
1100
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "param"),
1102
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param"),
1104
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param"),
1106
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "param"),
1108
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "param"),
1110
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "param"),
1148
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "assembly").WithArguments("assembly", "param"),
1150
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "module").WithArguments("module", "param"),
1152
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "type").WithArguments("type", "param"),
1154
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "param"),
1156
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param"),
1158
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param"),
1160
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "param"),
1162
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "param"),
1164
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "typevar").WithArguments("typevar", "param"),
Diagnostics\GetDiagnosticsTests.cs (1)
1560
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "field").WithLocation(5, 6));
FieldKeywordTests.cs (13)
1404
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(17, 25),
1407
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(18, 37),
1416
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(22, 25),
1419
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(23, 54),
1495
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(8, 6),
1498
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(9, 6),
1501
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(10, 6),
1504
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(11, 18),
1507
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(12, 18),
1510
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, return").WithLocation(13, 18),
1513
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(14, 31));
9968
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(3, 6),
9977
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(6, 6),
PartialEventsAndConstructorsTests.cs (22)
3321
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event").WithLocation(8, 13),
3324
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "event").WithLocation(8, 29),
3327
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "event").WithLocation(8, 44),
3330
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "event").WithLocation(8, 75),
3333
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event").WithLocation(9, 13),
3336
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "event").WithLocation(9, 29),
3339
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "event").WithLocation(9, 44),
3342
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "event").WithLocation(9, 75),
3345
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return").WithLocation(11, 64),
3348
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(11, 79),
3351
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return").WithLocation(12, 64),
3354
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(12, 79),
3357
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event").WithLocation(15, 29),
3360
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, event").WithLocation(15, 44),
3363
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, event").WithLocation(15, 75),
3366
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event").WithLocation(16, 29),
3369
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, event").WithLocation(16, 44),
3372
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, event").WithLocation(16, 75));
3466
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event").WithLocation(14, 11),
3472
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event").WithLocation(15, 11),
3481
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event").WithLocation(21, 24),
3496
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event").WithLocation(22, 24));
Semantics\PrimaryConstructorTests.cs (17)
3091
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param").WithLocation(10, 6),
3094
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param").WithLocation(11, 6),
3140
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param").WithLocation(8, 6),
3246
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type, method").WithLocation(7, 2)
3272
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(7, 2),
3275
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type").WithLocation(8, 2),
3305
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(7, 2),
3308
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type").WithLocation(8, 2),
3349
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(7, 2),
3352
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "type").WithLocation(8, 2)
3436
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(15, 2),
3439
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(18, 2)
3492
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(100, 2),
3498
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(300, 2),
3581
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(100, 2)
20767
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(3, 2));
20814
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "type").WithLocation(8, 2),
Semantics\RecordTests.cs (5)
25404
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "field, property, param").WithLocation(8, 6)
25479
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param").WithLocation(27, 6),
25482
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param").WithLocation(28, 6),
25563
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "param").WithLocation(27, 6),
25566
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "property").WithArguments("property", "param").WithLocation(28, 6),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\LocalFunctionTests.cs (4)
10423
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return").WithLocation(15, 14),
10459
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return").WithLocation(13, 10),
10489
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return").WithLocation(13, 10),
10522
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, return").WithLocation(13, 10),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
Symbols\PartialPropertiesTests.cs (8)
4085
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(7, 6),
4088
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(10, 6));
4251
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(6, 6),
4257
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(8, 6),
4260
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(11, 6),
4263
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(13, 6),
4269
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(16, 6),
4275
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "property").WithLocation(18, 6),
Symbols\Source\EventTests.cs (13)
2811
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, field, event").WithLocation(8, 28),
2814
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, field, event").WithLocation(8, 42),
2820
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "method, event").WithLocation(10, 28),
2823
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "method, event").WithLocation(10, 42),
2826
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, event").WithLocation(10, 71),
2829
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "method").WithArguments("method", "event").WithLocation(12, 13),
2832
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "param").WithArguments("param", "event").WithLocation(12, 28),
2835
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "return").WithArguments("return", "event").WithLocation(12, 42),
2838
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "event").WithLocation(12, 71),
2841
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return").WithLocation(14, 65),
2844
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(14, 80),
2847
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "event").WithArguments("event", "method, param, return").WithLocation(15, 65),
2850
Diagnostic(ErrorCode.
WRN_AttributeLocationOnBadDeclaration
, "field").WithArguments("field", "method, param, return").WithLocation(15, 80));