diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-09-19 13:36:53 -0500 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2024-09-19 14:56:45 -0500 |
commit | ac664697c54cf2ffa9ebef0215f734bcca3b718f (patch) | |
tree | e51c26852b32915c90c3f4ebf399827f8b45324d /clang/lib/Frontend/ChainedIncludesSource.cpp | |
parent | 434c9c50f99b1ad4e551c64af93287869389b087 (diff) | |
download | llvm-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.cpp | 2 |
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( |