[clang-tools-extra] r285731 - [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:07:06 PDT 2016


Author: malcolm.parsons
Date: Tue Nov  1 15:07:05 2016
New Revision: 285731

URL: http://llvm.org/viewvc/llvm-project?rev=285731&view=rev
Log:
[clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings

Reviewers: pcc, dblaikie

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26205

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

Modified: clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp?rev=285731&r1=285730&r2=285731&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp (original)
+++ clang-tools-extra/trunk/clang-query/tool/ClangQuery.cpp Tue Nov  1 15:07:05 2016
@@ -80,7 +80,7 @@ int main(int argc, const char **argv) {
     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 @@ int main(int argc, const char **argv) {
         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;
       }




More information about the cfe-commits mailing list