[cfe-commits] r57215 - /cfe/trunk/Driver/RewriteObjC.cpp
Ted Kremenek
kremenek at apple.com
Mon Oct 6 15:39:41 PDT 2008
Author: kremenek
Date: Mon Oct 6 17:39:38 2008
New Revision: 57215
URL: http://llvm.org/viewvc/llvm-project?rev=57215&view=rev
Log:
Use "DeclStmt::getSolitaryDecl()" when accessing the DeclStmt of an @catch.
Modified:
cfe/trunk/Driver/RewriteObjC.cpp
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=57215&r1=57214&r2=57215&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Mon Oct 6 17:39:38 2008
@@ -1422,7 +1422,7 @@
Rewrite.ReplaceText(startLoc, bodyBuf-startBuf+1,
buf.c_str(), buf.size());
} else if (DeclStmt *declStmt = dyn_cast<DeclStmt>(catchStmt)) {
- QualType t = dyn_cast<ValueDecl>(declStmt->getDecl())->getType();
+ QualType t = dyn_cast<ValueDecl>(declStmt->getSolitaryDecl())->getType();
if (t == Context->getObjCIdType()) {
buf += "1) { ";
ReplaceText(startLoc, lParenLoc-startBuf+1, buf.c_str(), buf.size());
More information about the cfe-commits
mailing list