diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-07-05 16:36:19 -0500 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-07-05 17:22:03 -0500 |
commit | 34855405b0a7dd6719fa3278f9b888f7f11bc4d8 (patch) | |
tree | a50a20f8ede8cf68f4972d163cbb638d712970a5 /llvm/lib/FileCheck/FileCheck.cpp | |
parent | dc1da93958be0311b79dce39d71bd954c478cf19 (diff) | |
download | llvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.zip llvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.tar.gz llvm-34855405b0a7dd6719fa3278f9b888f7f11bc4d8.tar.bz2 |
[llvm] Avoid 'raw_string_ostream::str' (NFC)
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.
Work towards TODO item to remove `raw_string_ostream::str()`.
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/lib/FileCheck/FileCheck.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp index 1eb8330..df5f7f4 100644 --- a/llvm/lib/FileCheck/FileCheck.cpp +++ b/llvm/lib/FileCheck/FileCheck.cpp @@ -1488,7 +1488,7 @@ std::string Check::FileCheckType::getModifiersDescription() const { if (isLiteralMatch()) OS << "LITERAL"; OS << '}'; - return OS.str(); + return Ret; } std::string Check::FileCheckType::getDescription(StringRef Prefix) const { |