From 6c7120d684cc46caafbe348d658158c0060a7638 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 5 Jul 2023 14:37:48 -0700 Subject: Bottleneck DeclRef creation through ASTBuilder. (#2689) * Bottleneck DeclRef creation through ASTBuilder. * Fix clang error. * Fix. * Fix. * More fix. * Rebase on top of tree. --------- Co-authored-by: Yong He --- source/slang/slang-parser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index f790cd4d2..5f9d5fbc4 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -1371,7 +1371,7 @@ namespace Slang auto paramType = DeclRefType::create( parser->astBuilder, - DeclRef(paramDecl, nullptr)); + DeclRef(paramDecl)); auto paramTypeExpr = parser->astBuilder->create(); paramTypeExpr->loc = paramDecl->loc; @@ -3107,7 +3107,7 @@ namespace Slang parser->FillPosition(paramConstraint); // substitution needs to be filled during check - DeclRefType* paramType = DeclRefType::create(parser->astBuilder, DeclRef(decl, nullptr)); + DeclRefType* paramType = DeclRefType::create(parser->astBuilder, DeclRef(decl)); SharedTypeExpr* paramTypeExpr = parser->astBuilder->create(); paramTypeExpr->loc = decl->loc; @@ -4320,7 +4320,7 @@ namespace Slang { // TODO(JS): // Is it valid to always have empty substitution set here? - DeclRef declRef(aggTypeDecl, SubstitutionSet()); + DeclRef declRef(aggTypeDecl); auto lookupResult = lookUpDirectAndTransparentMembers( parser->astBuilder, -- cgit v1.2.3