diff options
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 9662c43bb3e..7e72a8453b6 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -231,10 +231,10 @@ void Sema::ActOnEndOfTranslationUnit() { // Note: we traverse the scope's list of declarations rather than // the DeclContext's list, because we only want to see the most // recent declaration of each identifier. - for (Scope::decl_iterator I = TUScope->decl_begin(), - IEnd = TUScope->decl_end(); + for (Scope::decl_iterator I = TUScope->decl_begin(), + IEnd = TUScope->decl_end(); I != IEnd; ++I) { - Decl *D = static_cast<Decl *>(*I); + Decl *D = (*I).getAs<Decl>(); if (D->isInvalidDecl()) continue; |