]> granicus.if.org Git - clang/commitdiff
Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead of using...
authorTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:48:35 +0000 (18:48 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 6 Oct 2008 18:48:35 +0000 (18:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57196 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmt.cpp

index df832b70dc74147ea3915fb43ce1a7a59c212577..cb61ce969b7a9c889fd7c3431a4f8a1ef9810b27 100644 (file)
@@ -63,7 +63,7 @@ Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R,
       /*empty*/;
     
     if (i != NumElts) {
-      ScopedDecl *D = cast<DeclStmt>(Elts[i])->getDecl();
+      ScopedDecl *D = *cast<DeclStmt>(Elts[i])->decl_begin();
       Diag(D->getLocation(), diag::ext_mixed_decls_code);
     }
   }