[cfe-commits] r43826 - in /cfe/trunk: AST/Stmt.cpp include/clang/AST/Stmt.h
Fariborz Jahanian
fjahanian at apple.com
Wed Nov 7 09:43:17 PST 2007
Author: fjahanian
Date: Wed Nov 7 11:43:16 2007
New Revision: 43826
URL: http://llvm.org/viewvc/llvm-project?rev=43826&view=rev
Log:
Fixed an array overflow bug.
Modified:
cfe/trunk/AST/Stmt.cpp
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/AST/Stmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Stmt.cpp?rev=43826&r1=43825&r2=43826&view=diff
==============================================================================
--- cfe/trunk/AST/Stmt.cpp (original)
+++ cfe/trunk/AST/Stmt.cpp Wed Nov 7 11:43:16 2007
@@ -206,7 +206,7 @@
// ObjcAtTryStmt
Stmt::child_iterator ObjcAtTryStmt::child_begin() { return &SubStmts[0]; }
Stmt::child_iterator ObjcAtTryStmt::child_end() {
- return &SubStmts[0]+END_TRY;
+ return &SubStmts[0]+END_EXPR;
}
// ObjcAtThrowStmt
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=43826&r1=43825&r2=43826&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Wed Nov 7 11:43:16 2007
@@ -734,7 +734,6 @@
: Stmt(ObjcAtCatchStmtClass) {
SubExprs[SELECTOR] = catchVarStmtDecl;
SubExprs[BODY] = atCatchStmt;
- SubExprs[END_EXPR] = NULL;
if (!atCatchList)
NextAtCatchStmt = NULL;
else {
@@ -803,8 +802,8 @@
/// @try ... @catch ... @finally statement.
class ObjcAtTryStmt : public Stmt {
private:
- enum { TRY, CATCH, FINALLY, END_TRY };
- Stmt* SubStmts[END_TRY];
+ enum { TRY, CATCH, FINALLY, END_EXPR };
+ Stmt* SubStmts[END_EXPR];
SourceLocation AtTryLoc;
@@ -816,7 +815,6 @@
SubStmts[TRY] = atTryStmt;
SubStmts[CATCH] = atCatchStmt;
SubStmts[FINALLY] = atFinallyStmt;
- SubStmts[END_TRY] = NULL;
AtTryLoc = atTryLoc;
}
More information about the cfe-commits
mailing list