Fix diagnostics propagation in ComputeSharp generator

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-17 23:01:50 +02:00
1 親 50e82fce31
コミット 527a134082
5ファイル変更
+39 -68

検索条件に一致するファイルはありません

+3 -8
ファイルの表示
@@ -1,5 +1,4 @@
using System.Collections.Immutable;
using System.Linq;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
@@ -131,9 +130,7 @@ internal static class ISymbolExtensions
/// <returns>Whether or not <paramref name="symbol"/> has an attribute with the specified name.</returns>
public static bool HasAttributeWithFullyQualifiedName(this ISymbol symbol, string name)
{
ImmutableArray<AttributeData> attributes = symbol.GetAttributes();
foreach (AttributeData attribute in attributes)
foreach (AttributeData attribute in symbol.GetAttributes())
{
if (attribute.AttributeClass?.HasFullyQualifiedName(name) == true)
{
@@ -153,9 +150,7 @@ internal static class ISymbolExtensions
/// <returns>Whether or not <paramref name="symbol"/> has an attribute with the specified name.</returns>
public static bool TryGetAttributeWithFullMetadataName(this ISymbol symbol, string name, out AttributeData? attributeData)
{
ImmutableArray<AttributeData> attributes = symbol.GetAttributes();
foreach (AttributeData attribute in attributes)
foreach (AttributeData attribute in symbol.GetAttributes())
{
if (attribute.AttributeClass?.GetFullMetadataName() == name)
{