this maybe not ideal, but it is trivial and does fix the crash.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Ah, nice work!
Agree it's a hack (and how many more instances are lurking) but I don't know how better to fix it and it's been reported 3 times...
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | ||
---|---|---|
529 | I'm not sure we need to mention clangd here - I'd expect standalone clang-tidy to be able to hit the same condition? | |
clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp | ||
275 | Does the bug repro with clang-tidy? If so it'd be nice to make this a clang-tidy test. |
this is the only place in clang-tidy calling getTypeInfo.
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | ||
---|---|---|
529 | yeah logically, but it doesn't trigger the assertion somehow (haven't dig into it). removed it. I realized that the code below may change Descriptor.ElemType, refined the fix (we store the fixits, and emit the diagnostic at the end of the function). | |
clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp | ||
275 | unfortunately, not for standalone clang-tidy :( |
clang-format suggested style edits found: