From 26a0b3e04689fee1ec9ec071eacd72faf1efe4eb Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 8 Sep 2023 15:57:00 -0700 Subject: Fix attribute highlighting + language server crash. (#3198) * Fix attribute highlighting + language server crash. * Fix wave intrinsic. * Fix. * Fix. --------- Co-authored-by: Yong He --- source/slang/slang-check-expr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-check-expr.cpp') diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 88d95f04e..75fd5177e 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2073,7 +2073,7 @@ namespace Slang // Replace the expression. This should make this situation easier to detect. expr->arguments[pp] = lValueImplicitCast; } - else + else if (!as(argExpr->type)) { getSink()->diagnose( argExpr, @@ -2102,11 +2102,10 @@ namespace Slang // Fall back, in case there are other reasons... diagnostic = &Diagnostics::implicitCastUsedAsLValue; } - getSink()->diagnoseWithoutSourceView( argExpr, *diagnostic, - implicitCastExpr->arguments[pp]->type, + implicitCastExpr->arguments[0]->type, implicitCastExpr->type); } -- cgit v1.2.3