]> granicus.if.org Git - clang/commitdiff
Use "DeclStmt::getSolitaryDecl()" when accessing the DeclStmt of an @catch.
authorTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 22:39:38 +0000 (22:39 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 22:39:38 +0000 (22:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57215 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index d23bf2d22535ecb85aa6ac708f0be852375d1d0e..708c8446776c181d269557903dfe256cc509d3d9 100644 (file)
@@ -1422,7 +1422,7 @@ Stmt *RewriteObjC::RewriteObjCTryStmt(ObjCAtTryStmt *S) {
       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());