[cfe-commits] r46649 - in /cfe/trunk: Driver/RewriteTest.cpp include/clang/AST/Stmt.h

Steve Naroff snaroff at apple.com
Fri Feb 1 14:08:12 PST 2008


Author: snaroff
Date: Fri Feb  1 16:08:12 2008
New Revision: 46649

URL: http://llvm.org/viewvc/llvm-project?rev=46649&view=rev
Log:

Minor API cleanup...


Modified:
    cfe/trunk/Driver/RewriteTest.cpp
    cfe/trunk/include/clang/AST/Stmt.h

Modified: cfe/trunk/Driver/RewriteTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteTest.cpp?rev=46649&r1=46648&r2=46649&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteTest.cpp (original)
+++ cfe/trunk/Driver/RewriteTest.cpp Fri Feb  1 16:08:12 2008
@@ -1203,7 +1203,7 @@
     
     const char *lParenLoc = strchr(startBuf, '(');
 
-    if (!catchStmt) { // handle "..."
+    if (catchList->hasEllipsis()) {
       // Now rewrite the body...
       lastCatchBody = catchList->getCatchBody();
       SourceLocation rParenLoc = catchList->getRParenLoc();

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=46649&r1=46648&r2=46649&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Fri Feb  1 16:08:12 2008
@@ -847,7 +847,9 @@
   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;
   }





More information about the cfe-commits mailing list