summaryrefslogtreecommitdiffstats
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
commit0e34da42c55f316d6c0302c105458832613622ba (patch)
treeb837df1645d8ee84799f963bd1c45a0f42ee53ff
parent4026b041ce7d5a2bebdcd98d1958dba2b6c999cd (diff)
downloadbcm5719-llvm-0e34da42c55f316d6c0302c105458832613622ba.tar.gz
bcm5719-llvm-0e34da42c55f316d6c0302c105458832613622ba.zip
- 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. llvm-svn: 67812
-rw-r--r--clang/include/clang/Analysis/PathDiagnostic.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/include/clang/Analysis/PathDiagnostic.h b/clang/include/clang/Analysis/PathDiagnostic.h
index 9c6752570df..3d828dff477 100644
--- a/clang/include/clang/Analysis/PathDiagnostic.h
+++ b/clang/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));
}
OpenPOWER on IntegriCloud