diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-10-31 00:18:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-10-31 00:18:30 +0000 |
commit | ad51a600a08a72c1d53fa0d093ca31faf61e0e69 (patch) | |
tree | af58b9552ae40ede5e95ca871f207fae373d520d /lib/Analysis/GRExprEngineInternalChecks.cpp | |
parent | 8aed8068115ba9715484238c1d3452ad7825e8d3 (diff) |
Use llvm::raw_string_ostream instead of std::ostringstream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngineInternalChecks.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngineInternalChecks.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/GRExprEngineInternalChecks.cpp b/lib/Analysis/GRExprEngineInternalChecks.cpp index 428ffb23be..d772744f17 100644 --- a/lib/Analysis/GRExprEngineInternalChecks.cpp +++ b/lib/Analysis/GRExprEngineInternalChecks.cpp @@ -16,7 +16,7 @@ #include "clang/Analysis/PathSensitive/GRExprEngine.h" #include "clang/Basic/SourceManager.h" #include "llvm/Support/Compiler.h" -#include <sstream> +#include "llvm/Support/raw_ostream.h" using namespace clang; @@ -200,7 +200,8 @@ public: E)); // Generate a report for this bug. - std::ostringstream os; + std::string buf; + llvm::raw_string_ostream os(buf); SourceRange R; // Check if the region is a compound literal. @@ -220,8 +221,7 @@ public: << V.getRegion()->getString() << "' returned."; } - std::string s = os.str(); - RangedBugReport report(*this, N, s.c_str()); + RangedBugReport report(*this, N, os.str().c_str()); report.addRange(E->getSourceRange()); if (R.isValid()) report.addRange(R); |