[Lldb-commits] [lldb] 70b8f95 - [lldb][NFC] Use C++11 for loop in ClangASTSource::FindExternalLexicalDecls

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 4 12:57:36 PST 2020


Author: Raphael Isemann
Date: 2020-03-04T12:57:05-08:00
New Revision: 70b8f95813106491166fc9f18fa90a0866024ffc

URL: https://github.com/llvm/llvm-project/commit/70b8f95813106491166fc9f18fa90a0866024ffc
DIFF: https://github.com/llvm/llvm-project/commit/70b8f95813106491166fc9f18fa90a0866024ffc.diff

LOG: [lldb][NFC] Use C++11 for loop in ClangASTSource::FindExternalLexicalDecls

Added: 
    

Modified: 
    lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index c231cae58d2d..0b94b8d4b25c 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -466,10 +466,7 @@ void ClangASTSource::FindExternalLexicalDecls(
 
   // Indicates whether we skipped any Decls of the original DeclContext.
   bool SkippedDecls = false;
-  for (DeclContext::decl_iterator iter = original_decl_context->decls_begin();
-       iter != original_decl_context->decls_end(); ++iter) {
-    Decl *decl = *iter;
-
+  for (Decl *decl : original_decl_context->decls()) {
     // The predicate function returns true if the passed declaration kind is
     // the one we are looking for.
     // See clang::ExternalASTSource::FindExternalLexicalDecls()


        


More information about the lldb-commits mailing list