dgoldman added inline comments.

================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:8340
           }
+          // Bail out if we didn't make any correction progress on the checking
+          // TypoExpr TE, otherwise we risk running the loop forever.
----------------
sammccall wrote:
> Comment is good but maybe could mention the high-level effect of breaking out 
> (treat as unambiguous)
At this point we know the tree is so invalid that transforming no longer works, 
so our correction didn't really help. Is it even worth suggesting a correction 
(if we treat it as ambiguous we won't)?


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:8341-8344
+          // TypoExpr TE, otherwise we risk running the loop forever.
+          if (CurrentCorrection ==
+              &SemaRef.getTypoExprState(TE).Consumer->getCurrentCorrection())
+            break;
----------------
Is all of this needed - can you just change the while below to also be && Next 
!= TC? Could move Next assignment up into the body if we want to change how we 
handle stalled progress


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105533/new/

https://reviews.llvm.org/D105533

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to