diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-06 07:08:50 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-06 07:08:50 +0000 |
commit | a127ccaa38a23dbd9bd3884a2627c091075a7227 (patch) | |
tree | fd7fe269ab08a50def19f5a8904fd79f5bb4e901 /lib/Analysis/PathDiagnostic.cpp | |
parent | 14f234ec1257b36c9d070dfb60aa5df53ec04767 (diff) |
Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PathDiagnostic.cpp')
-rw-r--r-- | lib/Analysis/PathDiagnostic.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp index 818c5480ee..c078b6d0f2 100644 --- a/lib/Analysis/PathDiagnostic.cpp +++ b/lib/Analysis/PathDiagnostic.cpp @@ -47,6 +47,20 @@ PathDiagnostic::~PathDiagnostic() { 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, const DiagnosticInfo &Info) { |