[SemaTemplate] Fix uncorrected typos after pack expansion

Summary:
This case is particularly important for clangd, as it is triggered after
inserting the snippet for variadic functions.

Reviewers: kadircet, ilya-biryukov

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64677

llvm-svn: 366200
This commit is contained in:
Sam McCall 2019-07-16 10:30:21 +00:00
parent 06377ae2e5
commit 0afffab0d1
2 changed files with 3 additions and 0 deletions

View File

@ -619,6 +619,7 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc,
if (!Pattern->containsUnexpandedParameterPack()) {
Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs)
<< Pattern->getSourceRange();
CorrectDelayedTyposInExpr(Pattern);
return ExprError();
}

View File

@ -0,0 +1,2 @@
// RUN: %clang_cc1 -fsyntax-only %s -verify
int x = m(s...); // expected-error{{pack expansion does not}} expected-error{{undeclared identifier}}