modernize-use-auto NFC fixes

llvm-svn: 289656
diff --git a/clang-tools-extra/clang-query/Query.cpp b/clang-tools-extra/clang-query/Query.cpp
index ed27c21..b3344da 100644
--- a/clang-tools-extra/clang-query/Query.cpp
+++ b/clang-tools-extra/clang-query/Query.cpp
@@ -86,14 +86,11 @@
     }
     Finder.matchAST(AST->getASTContext());
 
-    for (std::vector<BoundNodes>::iterator MI = Matches.begin(),
-                                           ME = Matches.end();
-         MI != ME; ++MI) {
+    for (auto MI = Matches.begin(), ME = Matches.end(); MI != ME; ++MI) {
       OS << "\nMatch #" << ++MatchCount << ":\n\n";
 
-      for (BoundNodes::IDToNodeMap::const_iterator BI = MI->getMap().begin(),
-                                                   BE = MI->getMap().end();
-           BI != BE; ++BI) {
+      for (auto BI = MI->getMap().begin(), BE = MI->getMap().end(); BI != BE;
+           ++BI) {
         switch (QS.OutKind) {
         case OK_Diag: {
           clang::SourceRange R = BI->second.getSourceRange();
diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp
index 15d6bbc..c64d810 100644
--- a/clang-tools-extra/clang-query/QueryParser.cpp
+++ b/clang-tools-extra/clang-query/QueryParser.cpp
@@ -158,9 +158,7 @@
   std::vector<MatcherCompletion> Comps = Parser::completeExpression(
       StringRef(Begin, End - Begin), CompletionPos - Begin, nullptr,
       &QS.NamedValues);
-  for (std::vector<MatcherCompletion>::iterator I = Comps.begin(),
-                                                E = Comps.end();
-       I != E; ++I) {
+  for (auto I = Comps.begin(), E = Comps.end(); I != E; ++I) {
     Completions.push_back(LineEditor::Completion(I->TypedText, I->MatcherDecl));
   }
   return QueryRef();
diff --git a/clang-tools-extra/clang-query/tool/ClangQuery.cpp b/clang-tools-extra/clang-query/tool/ClangQuery.cpp
index 990b82b..669dc40 100644
--- a/clang-tools-extra/clang-query/tool/ClangQuery.cpp
+++ b/clang-tools-extra/clang-query/tool/ClangQuery.cpp
@@ -77,17 +77,13 @@
   QuerySession QS(ASTs);
 
   if (!Commands.empty()) {
-    for (cl::list<std::string>::iterator I = Commands.begin(),
-                                         E = Commands.end();
-         I != E; ++I) {
+    for (auto I = Commands.begin(), E = Commands.end(); I != E; ++I) {
       QueryRef Q = QueryParser::parse(*I, QS);
       if (!Q->run(llvm::outs(), QS))
         return 1;
     }
   } else if (!CommandFiles.empty()) {
-    for (cl::list<std::string>::iterator I = CommandFiles.begin(),
-                                         E = CommandFiles.end();
-         I != E; ++I) {
+    for (auto I = CommandFiles.begin(), E = CommandFiles.end(); I != E; ++I) {
       std::ifstream Input(I->c_str());
       if (!Input.is_open()) {
         llvm::errs() << argv[0] << ": cannot open " << *I << "\n";