Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).
Also necessary to fix:
<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index e987d84..63d3e7f 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -180,10 +180,10 @@
ObjCAtCatchStmt::ObjCAtCatchStmt(SourceLocation atCatchLoc,
SourceLocation rparenloc,
- DeclStmt *catchVarStmtDecl, Stmt *atCatchStmt,
+ ParmVarDecl *catchVarDecl, Stmt *atCatchStmt,
Stmt *atCatchList)
: Stmt(ObjCAtCatchStmtClass) {
- SubExprs[SELECTOR] = catchVarStmtDecl;
+ ExceptionDecl = catchVarDecl;
SubExprs[BODY] = atCatchStmt;
SubExprs[NEXT_CATCH] = NULL;
// FIXME: O(N^2) in number of catch blocks.