[PATCH] D142187: [clang] Fix typos in member initializers

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 05:03:41 PST 2023


hokein added a comment.

In D142187#4068092 <https://reviews.llvm.org/D142187#4068092>, @ilya-biryukov wrote:

> Randomly chiming in here.
> I never had a good model of where `CorrectDelayedTyposInExpr`, but wanted to note that `ActOnFullExpr` also calls it. This may be fine, I just wanted to mention it as it stood out.

+1, we seem to call `CorrectDelayedTyposInExpr` in an ad-hoc way.

The fix looks good to me, but I will leave the final stamp to @aaron.ballman, @cor3ntin.



================
Comment at: clang/test/PCH/typo3.cpp:6
+  // in PCH.
+  int y = bar;
+  // CHECK: use of undeclared identifier 'bar'
----------------
IIUC, the issue is that, we have a dangling `TypoExpr` under the `FieldDecl` in the final AST, which violates the contract of `TypoExpr`.


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