diff options
-rw-r--r-- | include/clang/Analysis/PathDiagnostic.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/clang/Analysis/PathDiagnostic.h b/include/clang/Analysis/PathDiagnostic.h index 9c6752570d..3d828dff47 100644 --- a/include/clang/Analysis/PathDiagnostic.h +++ b/include/clang/Analysis/PathDiagnostic.h @@ -67,7 +67,7 @@ public: FullSourceLoc asLocation() const; SourceRange asRange() const; - const Stmt *asStmt() const { return S ? S : 0; } + const Stmt *asStmt() const { return S; } }; class PathDiagnosticLocationPair { @@ -316,19 +316,22 @@ public: class PathDiagnosticControlFlowPiece : public PathDiagnosticPiece { std::vector<PathDiagnosticLocationPair> LPairs; public: - PathDiagnosticControlFlowPiece(FullSourceLoc startPos, FullSourceLoc endPos, + PathDiagnosticControlFlowPiece(const PathDiagnosticLocation &startPos, + const PathDiagnosticLocation &endPos, const std::string& s) : PathDiagnosticPiece(s, ControlFlow) { LPairs.push_back(PathDiagnosticLocationPair(startPos, endPos)); } - PathDiagnosticControlFlowPiece(FullSourceLoc startPos, FullSourceLoc endPos, + PathDiagnosticControlFlowPiece(const PathDiagnosticLocation &startPos, + const PathDiagnosticLocation &endPos, const char* s) : PathDiagnosticPiece(s, ControlFlow) { LPairs.push_back(PathDiagnosticLocationPair(startPos, endPos)); } - PathDiagnosticControlFlowPiece(FullSourceLoc startPos, FullSourceLoc endPos) + PathDiagnosticControlFlowPiece(const PathDiagnosticLocation &startPos, + const PathDiagnosticLocation &endPos) : PathDiagnosticPiece(ControlFlow) { LPairs.push_back(PathDiagnosticLocationPair(startPos, endPos)); } |