aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
authorYoungsuk Kim <youngsuk.kim@hpe.com>2024-07-05 16:36:19 -0500
committerYoungsuk Kim <youngsuk.kim@hpe.com>2024-07-05 17:22:03 -0500
commit34855405b0a7dd6719fa3278f9b888f7f11bc4d8 (patch)
treea50a20f8ede8cf68f4972d163cbb638d712970a5 /llvm/lib/FileCheck/FileCheck.cpp
parentdc1da93958be0311b79dce39d71bd954c478cf19 (diff)
downloadllvm-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.cpp2
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 {