From 0c64995ea28febcc7d38e1519da8d93391ce2e7d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 7 Jun 2022 14:10:49 -0700 Subject: Major language server features. (#2264) * Major language server features. * Include slangd in binary release. * Fix compiler issues. * Fix compiler error. * Completion resolve. * Various improvements. * Update diagnostic test expected output. * Bug fix for source locations. * Adjust diagnostic update frequency. * Update github actions to store artifacts. * Fix infinite parser loop. * Fix parser recovery. * Fix parser recovery. * Update test. * Fix test. * Disable IR gen for language server. * Allow commit characters in auto completion. * Fix lookup for invoke exprs. * More parser robustness fixes. * update solution file Co-authored-by: Yong He --- source/slang/slang-check-overload.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-check-overload.cpp') diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index e12f97640..f4a1de3d5 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -517,7 +517,8 @@ namespace Slang return ConstructDeclRefExpr( innerDeclRef, base, - originalExpr->loc); + originalExpr->loc, + originalExpr); } Expr* SemanticsVisitor::CompleteOverloadCandidate( @@ -556,8 +557,12 @@ namespace Slang goto error; { + auto originalAppExpr = as(context.originalExpr); auto baseExpr = ConstructLookupResultExpr( - candidate.item, context.baseExpr, context.funcLoc); + candidate.item, + context.baseExpr, + context.funcLoc, + originalAppExpr ? originalAppExpr->functionExpr : nullptr); switch(candidate.flavor) { @@ -568,12 +573,11 @@ namespace Slang { callExpr = m_astBuilder->create(); callExpr->loc = context.loc; - for(Index aa = 0; aa < context.argCount; ++aa) callExpr->arguments.add(context.getArg(aa)); } - + callExpr->originalFunctionExpr = callExpr->functionExpr; callExpr->functionExpr = baseExpr; callExpr->type = QualType(candidate.resultType); -- cgit v1.2.3