summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-synthesis.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-05 14:37:48 -0700
committerGitHub <noreply@github.com>2023-07-05 14:37:48 -0700
commit6c7120d684cc46caafbe348d658158c0060a7638 (patch)
treee8ba738564b5cdceda22013900a0ed762c184bd3 /source/slang/slang-ast-synthesis.cpp
parent6063304cb8d73d430e7ef81c62cd9822302fcc19 (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-synthesis.cpp')
-rw-r--r--source/slang/slang-ast-synthesis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-ast-synthesis.cpp b/source/slang/slang-ast-synthesis.cpp
index bab651ed9..5ad14321d 100644
--- a/source/slang/slang-ast-synthesis.cpp
+++ b/source/slang/slang-ast-synthesis.cpp
@@ -67,7 +67,7 @@ Expr* ASTSynthesizer::emitVarExpr(VarDecl* varDecl)
Expr* ASTSynthesizer::emitVarExpr(VarDecl* var, Type* type)
{
auto expr = m_builder->create<VarExpr>();
- expr->declRef = DeclRef<Decl>(var, nullptr);
+ expr->declRef = DeclRef<Decl>(var);
expr->type.type = type;
expr->type.isLeftValue = true;
return expr;
@@ -76,7 +76,7 @@ Expr* ASTSynthesizer::emitVarExpr(VarDecl* var, Type* type)
Expr* ASTSynthesizer::emitVarExpr(DeclStmt* varStmt, Type* type)
{
auto expr = m_builder->create<VarExpr>();
- expr->declRef = DeclRef<Decl>(as<Decl>(varStmt->decl), nullptr);
+ expr->declRef = DeclRef<Decl>(as<Decl>(varStmt->decl));
expr->type.type = type;
expr->type.isLeftValue = true;
return expr;