[PATCH] D26205: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings

Malcolm Parsons via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 13:16:35 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL285731: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings (authored by malcolm.parsons).

Changed prior to commit:
  https://reviews.llvm.org/D26205?vs=76597&id=76622#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26205

Files:
  clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp


Index: clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp
===================================================================
--- clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp
+++ clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp
@@ -80,7 +80,7 @@
     for (cl::list<std::string>::iterator I = Commands.begin(),
                                          E = Commands.end();
          I != E; ++I) {
-      QueryRef Q = QueryParser::parse(I->c_str(), QS);
+      QueryRef Q = QueryParser::parse(*I, QS);
       if (!Q->run(llvm::outs(), QS))
         return 1;
     }
@@ -97,7 +97,7 @@
         std::string Line;
         std::getline(Input, Line);
 
-        QueryRef Q = QueryParser::parse(Line.c_str(), QS);
+        QueryRef Q = QueryParser::parse(Line, QS);
         if (!Q->run(llvm::outs(), QS))
           return 1;
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26205.76622.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161101/3a997de1/attachment-0001.bin>


More information about the cfe-commits mailing list