If a string consisted only of whitespace, the emptiness check in
getFormattedText would fail, but DropTrailingNewLines would then
call Str.back() on an empty string. In practice, this can easily
crash clangd if an editor asks for a declaration comment that is
whitespace-only.
Details
Details
- Reviewers
ilya-biryukov
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
clang-format-diff not found in user's PATH; not linting file.