]> granicus.if.org Git - clang/commitdiff
Minor API cleanup...
authorSteve Naroff <snaroff@apple.com>
Fri, 1 Feb 2008 22:08:12 +0000 (22:08 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 1 Feb 2008 22:08:12 +0000 (22:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteTest.cpp
include/clang/AST/Stmt.h

index 4096dae3ab1643aba6c5e29ebc571fa724b1b4c5..178cf4e4cf9f8be5067bdd6932c0a61f8efbe321 100644 (file)
@@ -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();
index 751d995079caaaf527fcfd35bb1904158277c204..8ea6f1edbfd5b930eb808ae9e07a96e22fe70ae8 100644 (file)
@@ -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;
   }