forked from OSchip/llvm-project
Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions
llvm-svn: 66263
This commit is contained in:
parent
25b625165f
commit
5b9e7b833b
|
@ -94,21 +94,19 @@ public:
|
||||||
class PathDiagnostic {
|
class PathDiagnostic {
|
||||||
std::list<PathDiagnosticPiece*> path;
|
std::list<PathDiagnosticPiece*> path;
|
||||||
unsigned Size;
|
unsigned Size;
|
||||||
|
std::string BugType;
|
||||||
std::string Desc;
|
std::string Desc;
|
||||||
std::string Category;
|
std::string Category;
|
||||||
std::string BugType;
|
|
||||||
std::vector<std::string> OtherDesc;
|
std::vector<std::string> OtherDesc;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PathDiagnostic() : Size(0) {}
|
PathDiagnostic() : Size(0) {}
|
||||||
|
|
||||||
PathDiagnostic(const char* bugtype, const char* desc, const char* category)
|
PathDiagnostic(const char* bugtype, const char* desc, const char* category);
|
||||||
: Size(0), Desc(desc), Category(category), BugType(bugtype) {}
|
|
||||||
|
|
||||||
PathDiagnostic(const std::string& bugtype, const std::string& desc,
|
PathDiagnostic(const std::string& bugtype, const std::string& desc,
|
||||||
const std::string& category)
|
const std::string& category);
|
||||||
: Size(0), Desc(desc), Category(category), BugType(bugtype) {}
|
|
||||||
|
|
||||||
~PathDiagnostic();
|
~PathDiagnostic();
|
||||||
|
|
||||||
const std::string& getDescription() const { return Desc; }
|
const std::string& getDescription() const { return Desc; }
|
||||||
|
|
|
@ -47,6 +47,20 @@ PathDiagnostic::~PathDiagnostic() {
|
||||||
for (iterator I = begin(), E = end(); I != E; ++I) delete &*I;
|
for (iterator I = begin(), E = end(); I != E; ++I) delete &*I;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PathDiagnostic::PathDiagnostic(const char* bugtype, const char* desc,
|
||||||
|
const char* category)
|
||||||
|
: BugType(bugtype, GetNumCharsToLastNonPeriod(bugtype)),
|
||||||
|
Desc(desc, GetNumCharsToLastNonPeriod(desc)),
|
||||||
|
Category(category, GetNumCharsToLastNonPeriod(category)) {}
|
||||||
|
|
||||||
|
PathDiagnostic::PathDiagnostic(const std::string& bugtype,
|
||||||
|
const std::string& desc,
|
||||||
|
const std::string& category)
|
||||||
|
: BugType(bugtype, 0, GetNumCharsToLastNonPeriod(bugtype)),
|
||||||
|
Desc(desc, 0, GetNumCharsToLastNonPeriod(desc)),
|
||||||
|
Category(category, 0, GetNumCharsToLastNonPeriod(category)) {}
|
||||||
|
|
||||||
void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel,
|
void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel,
|
||||||
const DiagnosticInfo &Info) {
|
const DiagnosticInfo &Info) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue