]> granicus.if.org Git - clang/commitdiff
Fix a "basic" bug that resulted in a bogus SourceLocation.
authorSteve Naroff <snaroff@apple.com>
Tue, 6 Nov 2007 19:37:09 +0000 (19:37 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 6 Nov 2007 19:37:09 +0000 (19:37 +0000)
Off hand, I don't know why this change makes a difference (I thought the two constructor idioms were equivalent).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43770 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Stmt.h

index 5ec8724f89a72d02d2ec37b4efeaf06ba8c1958e..5a7c0524cdb228165ce274f933dcb544b84a8233 100644 (file)
@@ -748,11 +748,12 @@ public:
   ObjcAtTryStmt(SourceLocation atTryLoc, Stmt *atTryStmt, 
                 Stmt *atCatchStmt, 
                 Stmt *atFinallyStmt)
-  : Stmt(ObjcAtTryStmtClass), AtTryLoc(atTryLoc) {
+  : Stmt(ObjcAtTryStmtClass) {
       SubStmts[TRY] = atTryStmt;
       SubStmts[CATCH] = atCatchStmt;
       SubStmts[FINALLY] = atFinallyStmt;
       SubStmts[END_TRY] = NULL;
+      AtTryLoc = atTryLoc;
     }
     
   const Stmt *getTryBody() const { return SubStmts[TRY]; }