aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-02-01 22:08:12 +0000
committerSteve Naroff <snaroff@apple.com>2008-02-01 22:08:12 +0000
commitbe4b3332c2d17c03af6d015d9e8e2cc524806e6e (patch)
tree296cbdc8b401ce4fbf220c9e354a2782aabfc368
parent5fd69c3205db27e23e61accb420bb36f66e23fc2 (diff)
Minor API cleanup...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Driver/RewriteTest.cpp2
-rw-r--r--include/clang/AST/Stmt.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index 4096dae3ab..178cf4e4cf 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -1203,7 +1203,7 @@ Stmt *RewriteTest::RewriteObjCTryStmt(ObjCAtTryStmt *S) {
const char *lParenLoc = strchr(startBuf, '(');
- if (!catchStmt) { // handle "..."
+ if (catchList->hasEllipsis()) {
// Now rewrite the body...
lastCatchBody = catchList->getCatchBody();
SourceLocation rParenLoc = catchList->getRParenLoc();
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index 751d995079..8ea6f1edbf 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -847,7 +847,9 @@ public:
virtual SourceRange getSourceRange() const {
return SourceRange(AtCatchLoc, SubExprs[BODY]->getLocEnd());
}
-
+
+ bool hasEllipsis() const { return getCatchParamStmt() == 0; }
+
static bool classof(const Stmt *T) {
return T->getStmtClass() == ObjCAtCatchStmtClass;
}