================
@@ -2896,29 +2882,8 @@ Sema::ActOnIdExpression(Scope *S, CXXScopeSpec &SS,
// a template name, but we happen to have always already looked up the name
// before we get here if it must be a template name.
if (DiagnoseEmptyLookup(S, SS, R, CCC ? *CCC : DefaultValidator, nullptr,
- {}, nullptr, &TE)) {
- if (TE && KeywordReplacement) {
- auto &State = getTypoExprState(TE);
- auto BestTC = State.Consumer->getNextCorrection();
- if (BestTC.isKeyword()) {
- auto *II = BestTC.getCorrectionAsIdentifierInfo();
- if (State.DiagHandler)
- State.DiagHandler(BestTC);
- KeywordReplacement->startToken();
----------------
shafik wrote:
It looks like this change might be problematic, you removed
`KeywordReplacement` being set but it is still being passed in via
`UnconsumeToken(Replacement);` and if I squint just enough it looks like the
conditions `Result.isUnset()` won't be true anymore but it is not obvious and
it feels like it would have been better to remove this other code as well.
https://github.com/llvm/llvm-project/pull/143423
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits