[cfe-commits] r90678 - /cfe/trunk/lib/Frontend/RewriteObjC.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Dec 5 14:16:51 PST 2009
Author: d0k
Date: Sat Dec 5 16:16:51 2009
New Revision: 90678
URL: http://llvm.org/viewvc/llvm-project?rev=90678&view=rev
Log:
Don't call back() on an empty vector.
Modified:
cfe/trunk/lib/Frontend/RewriteObjC.cpp
Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=90678&r1=90677&r2=90678&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Sat Dec 5 16:16:51 2009
@@ -4591,8 +4591,7 @@
// for (id <FooProtocol> index in someArray) ;
// This is because RewriteObjCForCollectionStmt() does textual rewriting
// and it depends on the original text locations/positions.
- Stmt *ParentStmt = Stmts.back();
- if (!ParentStmt || !isa<ObjCForCollectionStmt>(ParentStmt))
+ if (Stmts.empty() || !isa<ObjCForCollectionStmt>(Stmts.back()))
RewriteObjCQualifiedInterfaceTypes(*DS->decl_begin());
// Blocks rewrite rules.
More information about the cfe-commits
mailing list