Skip to content

Commit

Permalink
Rebrand as ManagedTypeAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Yey007 committed Mar 30, 2024
1 parent 61fd179 commit e513d84
Show file tree
Hide file tree
Showing 24 changed files with 169 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using Xunit;
using VerifyCS =
ILGPU.Analyzers.Tests.Generic.DiagnosticAnalyzerVerifier<
ILGPU.Analyzers.ReferenceTypeAnalyzer>;
ILGPU.Analyzers.ManagedTypeAnalyzer>;

namespace ILGPU.Analyzers.Tests;

public class RefTypeAnalyzer
public class ManagedTypeAnalyzer
{
[Theory]
[InlineData("Simple")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
Id: ILA004,
Title: Array of managed types in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (29,25)-(29,42),
MessageFormat: Type '{0}' is an array of type '{1}', which is a managed type. Arrays of managed types cannot be used in kernels.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Arrays.RefType[]' is an array of type 'ILGPU.Analyzers.Tests.Programs.RefType.Arrays.RefType', which is a managed type. Arrays of managed types cannot be used in kernels.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (29,27)-(29,40),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Arrays.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (40,22)-(40,35),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.ManagedUnmanaged.Managed' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (17,20)-(17,33),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Constructors.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (20,27)-(20,40),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (14,27)-(14,40),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (32,15)-(32,28),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (14,21)-(14,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (19,21)-(19,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (24,21)-(24,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (29,21)-(29,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (34,21)-(34,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (39,21)-(39,34),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Functions.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (13,22)-(13,35),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Simple.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
},
{
Id: ILA003,
Title: Managed type in kernel,
Severity: Warning,
WarningLevel: 1,
Location: : (14,38)-(14,45),
MessageFormat: Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Message: Type 'ILGPU.Analyzers.Tests.Programs.RefType.Simple.RefType' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.,
Category: Usage
}
]

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace ILGPU.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class ReferenceTypeAnalyzer : KernelAnalyzer
public class ManagedTypeAnalyzer : KernelAnalyzer
{
private static readonly DiagnosticDescriptor GeneralDiagnosticRule = new(
id: "ILA003",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Title" xml:space="preserve">
<value>Reference type in kernel</value>
<value>Managed type in kernel</value>
</data>
<data name="MessageFormat" xml:space="preserve">
<value>Type '{0}' is a reference type. Reference types like classes cannot be used in kernels, except for arrays of value types.</value>
<value>Type '{0}' is a managed type. Managed types like classes cannot be used in kernels, except for arrays of unmanaged types.</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="MessageFormat" xml:space="preserve">
<value>Type '{0}' is an array of type '{1}', which is a reference type. Arrays of reference types cannot be used in kernels.</value>
<value>Type '{0}' is an array of type '{1}', which is a managed type. Arrays of managed types cannot be used in kernels.</value>
</data>
<data name="Title" xml:space="preserve">
<value>Array of reference types in kernel</value>
<value>Array of managed types in kernel</value>
</data>
</root>

0 comments on commit e513d84

Please sign in to comment.