61 references to ERR_InvalidAttributeArgument
Microsoft.CodeAnalysis.CSharp (10)
Errors\ErrorFacts.cs (1)
920
case ErrorCode.
ERR_InvalidAttributeArgument
:
Errors\MessageProvider.cs (1)
270
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, node.GetErrorDisplayName());
Symbols\Attributes\AttributeData.cs (3)
613
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntaxLocation, nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
640
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, node.GetErrorDisplayName());
657
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntaxLocation, nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
193
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceAssemblySymbol.cs (1)
2561
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntaxLocation, (object)nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
794
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceModuleSymbol.cs (1)
519
((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1240
diagnosticsOpt.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntax.Location, node.GetErrorDisplayName());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (46)
Attributes\AttributeTests.cs (1)
1993
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("System.Runtime.InteropServices.FieldOffset").WithLocation(4, 56),
Attributes\AttributeTests_MarshalAs.cs (2)
288
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(UnmanagedType)(-1)").WithArguments("MarshalAs"),
290
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(UnmanagedType)0x20000000").WithArguments("MarshalAs"));
Attributes\AttributeTests_StructLayout.cs (4)
293
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(LayoutKind)(-1)").WithArguments("StructLayout"),
295
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(LayoutKind)4").WithArguments("StructLayout"),
508
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("FieldOffset").WithLocation(17, 18),
514
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("FieldOffset").WithLocation(24, 18),
Attributes\AttributeTests_WellKnownAttributes.cs (39)
2503
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("DllImport"),
2505
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""""").WithArguments("DllImport"),
2511
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("DllImport"),
2515
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\0""").WithArguments("DllImport"),
2517
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\0b""").WithArguments("DllImport"),
2519
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""b\0""").WithArguments("DllImport"),
2521
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""x\0y""").WithArguments("DllImport"),
2525
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uD800""").WithArguments("DllImport"),
2527
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uDC00""").WithArguments("DllImport"),
2529
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uDC00\uD800""").WithArguments("DllImport"),
3311
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "1").WithArguments("MethodImpl"),
3313
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "2").WithArguments("MethodImpl"),
3315
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "3").WithArguments("MethodImpl"),
3317
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "5").WithArguments("MethodImpl"),
3319
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(MethodImplOptions)2").WithArguments("MethodImpl"),
3420
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(CharSet)int.MaxValue").WithArguments("DefaultCharSet"));
4507
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0-BB0F-4FE3-9860-ED714C51075""").WithArguments("Guid").WithLocation(9, 7),
4510
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F--4FE3-9860-ED714C510756""").WithArguments("Guid").WithLocation(12, 7),
4513
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""""").WithArguments("Guid").WithLocation(15, 7),
4516
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("Guid").WithLocation(18, 7));
4544
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F4FE39860ED714C510756""").WithArguments("Guid").WithLocation(7, 7),
4547
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""{69D3E2A0-BB0F-4FE3-9860-ED714C510756}""").WithArguments("Guid").WithLocation(10, 7),
4550
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""(69D3E2A0-BB0F-4FE3-9860-ED714C510756)""").WithArguments("Guid").WithLocation(13, 7),
4553
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}""").WithArguments("Guid").WithLocation(16, 7));
4568
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F--4FE3-9860-ED714C510756""").WithArguments("Guid").WithLocation(5, 17));
5306
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ClassInterfaceType)(-1)").WithArguments("ClassInterface"),
5309
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ClassInterfaceType)3").WithArguments("ClassInterface"),
5312
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)(-1)").WithArguments("ClassInterface"),
5315
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)3").WithArguments("ClassInterface"),
5385
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ComInterfaceType)(-1)").WithArguments("InterfaceType"),
5388
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ComInterfaceType)4").WithArguments("InterfaceType"),
5391
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)(-1)").WithArguments("InterfaceType"),
5394
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)4").WithArguments("InterfaceType"),
5444
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("TypeLibVersionAttribute"),
5447
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "int.MinValue").WithArguments("TypeLibVersionAttribute"));
5490
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5493
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5496
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5499
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ImplicitObjectCreationTests.cs (2)
4687
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "new AttributeTargets()").WithArguments("AttributeUsage").WithLocation(4, 17),
4690
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "new()").WithArguments("AttributeUsage").WithLocation(7, 17)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\SymbolErrorTests.cs (3)
11141
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "0").WithArguments("AttributeUsage").WithLocation(2, 17),
11143
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "0").WithArguments("AttributeUsageAttribute").WithLocation(4, 26));
15890
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(CharSet)42").WithArguments("DefaultCharSetAttribute")