GetTypePtr requires that the type should not be null, otherwise we hit
an assertion, we should use getTypePtrOrNull instead.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang-tools-extra/clangd/Selection.cpp | ||
---|---|---|
367 ↗ | (On Diff #209166) | sorry, the previous patch rL365751 didn't fix the crash, and I re-read the code more thoroughly, I think we will never hit this point, need you confirmation, @sammccall. |
clang-tools-extra/clangd/Selection.cpp | ||
---|---|---|
361 ↗ | (On Diff #209166) | can we just rewrite this as while (Root->Children.size() == 1 && !Root->Selected) Ancestor = Ancestor->Children.front(); return Root; seems a lot clearer, not sure what I was thinking when I wrote this... |
368 ↗ | (On Diff #209166) | there's no termination condition for the loop. If there were, the compiler would warn us. |