[PATCH] D64677: [SemaTemplate] Fix uncorrected typos after pack expansion
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 03:05:15 PDT 2019
sammccall marked an inline comment as done.
sammccall added inline comments.
================
Comment at: clang/lib/Sema/SemaTemplateVariadic.cpp:622
<< Pattern->getSourceRange();
+ CorrectDelayedTyposInExpr(Pattern);
return ExprError();
----------------
kadircet wrote:
> why not directly `return CorrectDelayedTyposInExpr(Pattern);` ?
Because the error isn't that `Pattern` is invalid per se (in a way that CorrectDelayedTyposInExpr can see), but rather that there's no pack to expand.
So even if CorrectDelayedTyposInExpr returns something valid, we still want to return ExprError(). We call it for its side-effects of flushing typos and emitting diagnostics.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64677/new/
https://reviews.llvm.org/D64677
More information about the cfe-commits
mailing list