One of our buildbot for FreeBSD does not support std::to_string.
Use stringstream instead to convert int to string llvm-svn: 210972
This commit is contained in:
parent
ac5a08a56a
commit
06aebc4d69
|
@ -51,10 +51,10 @@ Major New Features
|
||||||
GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
|
GCC 4.7 changed the mingw ABI. Clang 3.4 and older use the GCC 4.6
|
||||||
ABI. Clang 3.5 and newer use the GCC 4.7 abi.
|
ABI. Clang 3.5 and newer use the GCC 4.7 abi.
|
||||||
|
|
||||||
- The __has_attribute feature test is now target-aware. Older versions of Clang
|
- The __has_attribute feature test is now target-aware. Older versions of Clang
|
||||||
would return true when the attribute spelling was known, regardless of whether
|
would return true when the attribute spelling was known, regardless of whether
|
||||||
the attribute was available to the specific target. Clang now returns true only
|
the attribute was available to the specific target. Clang now returns true
|
||||||
when the attribute pertains to the current compilation target.
|
only when the attribute pertains to the current compilation target.
|
||||||
|
|
||||||
|
|
||||||
Improvements to Clang's diagnostics
|
Improvements to Clang's diagnostics
|
||||||
|
@ -144,6 +144,16 @@ libclang
|
||||||
Static Analyzer
|
Static Analyzer
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
The `-analyzer-config` options are now passed from scan-build through to
|
||||||
|
ccc-analyzer and then to Clang.
|
||||||
|
|
||||||
|
With the option `-analyzer-config stable-report-filename=true`,
|
||||||
|
instead of `report-XXXXXX.html`, scan-build/clang analyzer generate
|
||||||
|
`report-<filename>-<function, method name>-<function position>-<id>.html`.
|
||||||
|
(id = i++ for several issues found in the same function/method).
|
||||||
|
|
||||||
|
List the function/method name in the index page of scan-build.
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
Core Analysis Improvements
|
Core Analysis Improvements
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
using namespace ento;
|
using namespace ento;
|
||||||
|
@ -292,14 +293,15 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
|
||||||
std::error_code EC;
|
std::error_code EC;
|
||||||
do {
|
do {
|
||||||
// Find a filename which is not already used
|
// Find a filename which is not already used
|
||||||
|
std::stringstream filename;
|
||||||
Model = "";
|
Model = "";
|
||||||
|
filename << "report-"
|
||||||
|
<< llvm::sys::path::filename(Entry->getName()).str()
|
||||||
|
<< "-" << declName.c_str()
|
||||||
|
<< "-" << offsetDecl
|
||||||
|
<< "-" << i << ".html";
|
||||||
llvm::sys::path::append(Model, Directory,
|
llvm::sys::path::append(Model, Directory,
|
||||||
"report-" +
|
filename.str());
|
||||||
llvm::sys::path::filename(Entry->getName()) +
|
|
||||||
"-" +
|
|
||||||
declName.c_str() +
|
|
||||||
"-" + std::to_string(offsetDecl) +
|
|
||||||
"-" + std::to_string(i) + ".html");
|
|
||||||
EC = llvm::sys::fs::openFileForWrite(Model.str(),
|
EC = llvm::sys::fs::openFileForWrite(Model.str(),
|
||||||
FD,
|
FD,
|
||||||
llvm::sys::fs::F_RW |
|
llvm::sys::fs::F_RW |
|
||||||
|
|
Loading…
Reference in New Issue