Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Great analysis, and the bailout seems reasonable. The overall algorithm seems terribly confusing though :-(
| clang/lib/Sema/SemaExprCXX.cpp | ||
|---|---|---|
| 8338 | Comment is good but maybe could mention the high-level effect of breaking out (treat as unambiguous) | |
| clang/lib/Sema/SemaExprCXX.cpp | ||
|---|---|---|
| 8338 | 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)? | |
| 8339–8342 | 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 | |
| clang/lib/Sema/SemaExprCXX.cpp | ||
|---|---|---|
| 8338 | Nevermind, misunderstood, left some comments on the bug there. What happens if the right correction actually was ambiguous though? Would we skip it here? | |
| clang/test/Sema/typo-correction-no-hang.c | ||
| 5–15 | Could you add another test case for the same thing but making the correction ambiguous, e.g. g_998 or similar? | |
refine the fix based on the discussion: https://bugs.llvm.org/show_bug.cgi?id=50797#c13
Thanks! Just to confirm, the non-simplified example is also fixed, right?
struct a {
int xxx;
};
int g_107;
int g_108;
int g_109;
struct a g_999;
void b() { (g_910.xxx = g_910.xxx1); }
Comment is good but maybe could mention the high-level effect of breaking out (treat as unambiguous)