61 references to ERR_InvalidAttributeArgument
Microsoft.CodeAnalysis.CSharp (10)
Errors\ErrorFacts.cs (1)
982
or ErrorCode.
ERR_InvalidAttributeArgument
Errors\MessageProvider.cs (1)
263
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, ((CSharpAttributeData)attribute).GetAttributeArgumentLocation(parameterIndex), node.GetErrorDisplayName());
Symbols\Attributes\AttributeData.cs (3)
590
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, this.GetAttributeArgumentLocation(0), nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
616
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, this.GetAttributeArgumentLocation(0), node.GetErrorDisplayName());
633
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attributeArgumentSyntaxLocation, nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
193
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceAssemblySymbol.cs (1)
2605
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attribute.GetAttributeArgumentLocation(i), (object)nodeOpt != null ? nodeOpt.GetErrorDisplayName() : "");
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
852
diagnostics.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceModuleSymbol.cs (1)
573
((BindingDiagnosticBag)arguments.Diagnostics).Add(ErrorCode.
ERR_InvalidAttributeArgument
, attribute.GetAttributeArgumentLocation(0), arguments.AttributeSyntaxOpt.GetErrorDisplayName());
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1327
diagnosticsOpt.Add(ErrorCode.
ERR_InvalidAttributeArgument
, attribute.GetAttributeArgumentLocation(0), node.GetErrorDisplayName());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
Attributes\AttributeTests.cs (1)
2031
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)
2584
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("DllImport"),
2586
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""""").WithArguments("DllImport"),
2592
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("DllImport"),
2596
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\0""").WithArguments("DllImport"),
2598
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\0b""").WithArguments("DllImport"),
2600
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""b\0""").WithArguments("DllImport"),
2602
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""x\0y""").WithArguments("DllImport"),
2606
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uD800""").WithArguments("DllImport"),
2608
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uDC00""").WithArguments("DllImport"),
2610
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""\uDC00\uD800""").WithArguments("DllImport"),
3392
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "1").WithArguments("MethodImpl"),
3394
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "2").WithArguments("MethodImpl"),
3396
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "3").WithArguments("MethodImpl"),
3398
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "5").WithArguments("MethodImpl"),
3400
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(MethodImplOptions)2").WithArguments("MethodImpl"),
3501
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(CharSet)int.MaxValue").WithArguments("DefaultCharSet"));
4588
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0-BB0F-4FE3-9860-ED714C51075""").WithArguments("Guid").WithLocation(9, 7),
4591
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F--4FE3-9860-ED714C510756""").WithArguments("Guid").WithLocation(12, 7),
4594
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""""").WithArguments("Guid").WithLocation(15, 7),
4597
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "null").WithArguments("Guid").WithLocation(18, 7));
4625
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F4FE39860ED714C510756""").WithArguments("Guid").WithLocation(7, 7),
4628
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""{69D3E2A0-BB0F-4FE3-9860-ED714C510756}""").WithArguments("Guid").WithLocation(10, 7),
4631
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""(69D3E2A0-BB0F-4FE3-9860-ED714C510756)""").WithArguments("Guid").WithLocation(13, 7),
4634
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}""").WithArguments("Guid").WithLocation(16, 7));
4649
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, @"""69D3E2A0BB0F--4FE3-9860-ED714C510756""").WithArguments("Guid").WithLocation(5, 17));
5395
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ClassInterfaceType)(-1)").WithArguments("ClassInterface"),
5398
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ClassInterfaceType)3").WithArguments("ClassInterface"),
5401
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)(-1)").WithArguments("ClassInterface"),
5404
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)3").WithArguments("ClassInterface"),
5474
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ComInterfaceType)(-1)").WithArguments("InterfaceType"),
5477
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(ComInterfaceType)4").WithArguments("InterfaceType"),
5480
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)(-1)").WithArguments("InterfaceType"),
5483
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(short)4").WithArguments("InterfaceType"),
5533
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("TypeLibVersionAttribute"),
5536
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "int.MinValue").WithArguments("TypeLibVersionAttribute"));
5579
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5582
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5585
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"),
5588
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "-1").WithArguments("ComCompatibleVersionAttribute"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ImplicitObjectCreationTests.cs (2)
4828
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "new AttributeTargets()").WithArguments("AttributeUsage").WithLocation(4, 17),
4831
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "new()").WithArguments("AttributeUsage").WithLocation(7, 17)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\SymbolErrorTests.cs (3)
11284
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "0").WithArguments("AttributeUsage").WithLocation(2, 17),
11286
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "0").WithArguments("AttributeUsageAttribute").WithLocation(4, 26));
16035
Diagnostic(ErrorCode.
ERR_InvalidAttributeArgument
, "(CharSet)42").WithArguments("DefaultCharSetAttribute")