[PATCH] D142187: [clang] Fix typos in member initializers
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 20 07:43:34 PST 2023
ilya-biryukov added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:4101
- ExprResult Init = InitExpr;
- if (!FD->getType()->isDependentType() && !InitExpr->isTypeDependent()) {
- Init = ConvertMemberDefaultInitExpression(FD, InitExpr, InitLoc);
+ ExprResult Init = CorrectDelayedTyposInExpr(InitExpr, /*InitDecl=*/nullptr,
+ /*RecoverUncorrectedTypos=*/true);
----------------
kadircet wrote:
> ilya-biryukov wrote:
> > Should we pass `FD` here to avoid correcting to itself?
> unfortunately the interface requires a VarDecl, hence we can't pass a FieldDecl.
Ah, it also does not seem to suggest any `FieldDecl`s for typo correction. Nevermind then, sorry for the noise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142187/new/
https://reviews.llvm.org/D142187
More information about the cfe-commits
mailing list