aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-27 02:22:03 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-27 02:22:03 +0000
commita11982a01d2a239a5132b1871f2b417de11ab80d (patch)
tree6c7e196a617dd146f066bb04ddbd99899cce5147
parent950bedd8a9f00caabd2f1fc6812d70e08103f847 (diff)
- Fix thinko in implementation of PathDiagnosticLocation::asStmt(). Thanks to
Anders Johnsen for pointing this out. - Have PathDiagnosticControlFlowPiece take PathDiagnosticLocation for the arguments to its constructors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67812 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathDiagnostic.h11
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));
}