aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ChainedIncludesSource.cpp
diff options
context:
space:
mode:
authorYoungsuk Kim <youngsuk.kim@hpe.com>2024-09-19 13:36:53 -0500
committerYoungsuk Kim <youngsuk.kim@hpe.com>2024-09-19 14:56:45 -0500
commitac664697c54cf2ffa9ebef0215f734bcca3b718f (patch)
treee51c26852b32915c90c3f4ebf399827f8b45324d /clang/lib/Frontend/ChainedIncludesSource.cpp
parent434c9c50f99b1ad4e551c64af93287869389b087 (diff)
downloadllvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.zip
llvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.tar.gz
llvm-ac664697c54cf2ffa9ebef0215f734bcca3b718f.tar.bz2
[clang] Tidy uses of raw_string_ostream (NFC)
As specified in the docs, 1) raw_string_ostream is always unbuffered and 2) the underlying buffer may be used directly ( 65b13610a5226b84889b923bae884ba395ad084d for further reference ) * Don't call raw_string_ostream::flush(), which is essentially a no-op. * Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection.
Diffstat (limited to 'clang/lib/Frontend/ChainedIncludesSource.cpp')
-rw-r--r--clang/lib/Frontend/ChainedIncludesSource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp
index c1a9f25..a7096e2 100644
--- a/clang/lib/Frontend/ChainedIncludesSource.cpp
+++ b/clang/lib/Frontend/ChainedIncludesSource.cpp
@@ -159,7 +159,7 @@ IntrusiveRefCntPtr<ExternalSemaSource> clang::createChainedIncludesSource(
std::string pchName = includes[i-1];
llvm::raw_string_ostream os(pchName);
os << ".pch" << i-1;
- serialBufNames.push_back(os.str());
+ serialBufNames.push_back(pchName);
IntrusiveRefCntPtr<ASTReader> Reader;
Reader = createASTReader(