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.
----------------
dgoldman wrote:
> 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)?
Nevermind, misunderstood, left some comments on the bug there. What happens if 
the right correction actually was ambiguous though? Would we skip it here?


================
Comment at: clang/test/Sema/typo-correction-no-hang.c:4-14
+struct a {
+  int xxx;
+};
+
+int g_107;
+int g_108;
+int g_109;
----------------
Could you add another test case for the same thing but making the correction 
ambiguous, e.g. g_998 or similar?


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