summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2014-06-14 09:28:27 +0000
committerSylvestre Ledru <sylvestre@debian.org>2014-06-14 09:28:27 +0000
commit06aebc4d69a9ffd5eedb9d76ebb9117335f55eb3 (patch)
tree1fa34b84b18b65fa4d240fe2e035d322aaea2bc4 /clang/lib/StaticAnalyzer
parentac5a08a56abba29351c3b1675d7142172f6c0d71 (diff)
downloadbcm5719-llvm-06aebc4d69a9ffd5eedb9d76ebb9117335f55eb3.tar.gz
bcm5719-llvm-06aebc4d69a9ffd5eedb9d76ebb9117335f55eb3.zip
One of our buildbot for FreeBSD does not support std::to_string.
Use stringstream instead to convert int to string llvm-svn: 210972
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
index 2a455464822..b1e9f06cae0 100644
--- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
@@ -26,6 +26,7 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
+#include <sstream>
using namespace clang;
using namespace ento;
@@ -292,14 +293,15 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
std::error_code EC;
do {
// Find a filename which is not already used
+ std::stringstream filename;
Model = "";
+ filename << "report-"
+ << llvm::sys::path::filename(Entry->getName()).str()
+ << "-" << declName.c_str()
+ << "-" << offsetDecl
+ << "-" << i << ".html";
llvm::sys::path::append(Model, Directory,
- "report-" +
- llvm::sys::path::filename(Entry->getName()) +
- "-" +
- declName.c_str() +
- "-" + std::to_string(offsetDecl) +
- "-" + std::to_string(i) + ".html");
+ filename.str());
EC = llvm::sys::fs::openFileForWrite(Model.str(),
FD,
llvm::sys::fs::F_RW |
OpenPOWER on IntegriCloud