From: Steve Naroff Date: Tue, 6 Nov 2007 19:37:09 +0000 (+0000) Subject: Fix a "basic" bug that resulted in a bogus SourceLocation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccdbc5c6f14965d91a352d114c109a9d4d9552b8;p=clang Fix a "basic" bug that resulted in a bogus SourceLocation. 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 --- diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 5ec8724f89..5a7c0524cd 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -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]; }