Skip to content

Commit 79910b3

Browse files
committed
fix crash on Brunsli
1 parent 15eae42 commit 79910b3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎cpp2rust/converter/rules/registry.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ clang::QualType GetInitType(const clang::Expr *expr) {
324324
assert(!pattern.isNull() && "rule has no Init<T, Args> pack");
325325
clang::MultiLevelTemplateArgumentList args(
326326
function->getDescribedFunctionTemplate(), match.args, /*Final=*/false);
327+
clang::Sema::InstantiatingTemplate inst(
328+
*sema_, expr->getBeginLoc(), const_cast<clang::FunctionDecl *>(function));
327329
return sema_->SubstType(pattern, args, expr->getBeginLoc(),
328330
clang::DeclarationName());
329331
}

0 commit comments

Comments
 (0)