Pass the filter function_ref by value now that r221753 fixes the bug
that was preventing pass-by-value from working correctly. llvm-svn: 221803
This commit is contained in:
parent
4c219fd248
commit
98a3ec010a
|
@ -5989,8 +5989,8 @@ class TransformTypos : public TreeTransform<TransformTypos> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TransformTypos(Sema &SemaRef, llvm::function_ref<ExprResult(Expr *)> &&Filter)
|
TransformTypos(Sema &SemaRef, llvm::function_ref<ExprResult(Expr *)> Filter)
|
||||||
: BaseTransform(SemaRef), ExprFilter(std::move(Filter)) {}
|
: BaseTransform(SemaRef), ExprFilter(Filter) {}
|
||||||
|
|
||||||
ExprResult RebuildCallExpr(Expr *Callee, SourceLocation LParenLoc,
|
ExprResult RebuildCallExpr(Expr *Callee, SourceLocation LParenLoc,
|
||||||
MultiExprArg Args,
|
MultiExprArg Args,
|
||||||
|
@ -6075,7 +6075,7 @@ ExprResult Sema::CorrectDelayedTyposInExpr(
|
||||||
(E->isTypeDependent() || E->isValueDependent() ||
|
(E->isTypeDependent() || E->isValueDependent() ||
|
||||||
E->isInstantiationDependent())) {
|
E->isInstantiationDependent())) {
|
||||||
auto TyposResolved = DelayedTypos.size();
|
auto TyposResolved = DelayedTypos.size();
|
||||||
auto Result = TransformTypos(*this, std::move(Filter)).Transform(E);
|
auto Result = TransformTypos(*this, Filter).Transform(E);
|
||||||
TyposResolved -= DelayedTypos.size();
|
TyposResolved -= DelayedTypos.size();
|
||||||
if (TyposResolved) {
|
if (TyposResolved) {
|
||||||
ExprEvalContexts.back().NumTypos -= TyposResolved;
|
ExprEvalContexts.back().NumTypos -= TyposResolved;
|
||||||
|
|
Loading…
Reference in New Issue