From: Ted Kremenek Date: Mon, 6 Oct 2008 18:48:35 +0000 (+0000) Subject: Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead of using... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bddf7e9c5f0243f0a2f65bc40b31e060ff260f3;p=clang Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead of using DeclStmt::getDecl(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57196 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index df832b70dc..cb61ce969b 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -63,7 +63,7 @@ Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R, /*empty*/; if (i != NumElts) { - ScopedDecl *D = cast(Elts[i])->getDecl(); + ScopedDecl *D = *cast(Elts[i])->decl_begin(); Diag(D->getLocation(), diag::ext_mixed_decls_code); } }