This is an archive of the discontinued LLVM Phabricator instance.

Added hack to prevent toHalfOpenFileRange assertion fail
AbandonedPublic

Authored by SureYeaah on Aug 1 2019, 6:34 AM.

Details

Summary

Event Timeline

SureYeaah created this revision.Aug 1 2019, 6:34 AM
sammccall added inline comments.Aug 2 2019, 1:30 AM
clang-tools-extra/clangd/Selection.cpp
373

This isn't a sufficient fix, there are 5 callsites that don't check for failure.
Adding defenses to each of them is the right thing if we really can't handle failure, but today they assume the invariant that if the inputs were from the same file id, the output will be valid. Can we really not provide that guarantee?

clang-tools-extra/clangd/SourceCode.cpp
314

We have a reproducer, why can't we investigate now?

SureYeaah marked an inline comment as done.Aug 2 2019, 4:16 AM
SureYeaah added inline comments.
clang-tools-extra/clangd/SourceCode.cpp
314

Doing that. Just wanted to stop the crashes in the meanwhile.

SureYeaah abandoned this revision.Aug 5 2019, 9:13 AM