[PATCH] D64677: [SemaTemplate] Fix uncorrected typos after pack expansion
Sam McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 16:14:48 PDT 2019
sammccall created this revision.
sammccall added reviewers: kadircet, ilya-biryukov.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This case is particularly important for clangd, as it is triggered after
inserting the snippet for variadic functions.
Repository:
rL LLVM
https://reviews.llvm.org/D64677
Files:
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/test/SemaTemplate/typo-variadic.cpp
Index: clang/test/SemaTemplate/typo-variadic.cpp
===================================================================
--- /dev/null
+++ clang/test/SemaTemplate/typo-variadic.cpp
@@ -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}}
Index: clang/lib/Sema/SemaTemplateVariadic.cpp
===================================================================
--- clang/lib/Sema/SemaTemplateVariadic.cpp
+++ clang/lib/Sema/SemaTemplateVariadic.cpp
@@ -619,6 +619,7 @@
if (!Pattern->containsUnexpandedParameterPack()) {
Diag(EllipsisLoc, diag::err_pack_expansion_without_parameter_packs)
<< Pattern->getSourceRange();
+ CorrectDelayedTyposInExpr(Pattern);
return ExprError();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64677.209631.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190712/de4937d2/attachment.bin>
More information about the llvm-commits
mailing list