diff options
author | 2020-08-09 15:51:07 +0000 | |
---|---|---|
committer | 2020-08-09 15:51:07 +0000 | |
commit | 389bb291c0c8961ca40ac7a2636e1ca69ca7653c (patch) | |
tree | e027d0b3ed5ed27fe08d1bcaa20e3c191232a53b /gnu/llvm/clang/lib/AST/RawCommentList.cpp | |
parent | Import LLVM 10.0.1 including clang, lld and lldb. (diff) | |
download | wireguard-openbsd-389bb291c0c8961ca40ac7a2636e1ca69ca7653c.tar.xz wireguard-openbsd-389bb291c0c8961ca40ac7a2636e1ca69ca7653c.zip |
Import LLVM 10.0.1 including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/clang/lib/AST/RawCommentList.cpp')
-rw-r--r-- | gnu/llvm/clang/lib/AST/RawCommentList.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/llvm/clang/lib/AST/RawCommentList.cpp b/gnu/llvm/clang/lib/AST/RawCommentList.cpp index 83e8a0b942a..d7124156521 100644 --- a/gnu/llvm/clang/lib/AST/RawCommentList.cpp +++ b/gnu/llvm/clang/lib/AST/RawCommentList.cpp @@ -430,7 +430,7 @@ std::string RawComment::getFormattedText(const SourceManager &SourceMgr, }; auto DropTrailingNewLines = [](std::string &Str) { - while (Str.back() == '\n') + while (!Str.empty() && Str.back() == '\n') Str.pop_back(); }; |