jbangert updated this revision to Diff 94297.
jbangert added a comment.
Fix command line tool.
https://reviews.llvm.org/D29622
Files:
clang-query/CMakeLists.txt
clang-query/QueryReplace.cpp
clang-query/QueryReplace.h
clang-query/replace-tool/CMakeLists.txt
clang-query/replace-tool/Cla
jbangert added a comment.
Thank you for the feedback, addressed and reformatted using llvm style.
Comment at: clang-query/QueryReplace.h:35-36
+
+ /// \brief Replacement text. %"identifier" will be substituted by the text of
+ /// an identifier.
+ std::string ToTemplate;
---
jbangert updated this revision to Diff 87580.
jbangert marked 7 inline comments as done.
jbangert added a comment.
Response to initial code review.
https://reviews.llvm.org/D29622
Files:
clang-query/CMakeLists.txt
clang-query/QueryReplace.cpp
clang-query/QueryReplace.h
clang-query/repla
sbenza added inline comments.
Comment at: clang-query/QueryReplace.h:35-36
+
+ /// \brief Replacement text. %"identifier" will be substituted by the text of
+ /// an identifier.
+ std::string ToTemplate;
klimek wrote:
> This doesn't seem to come up in the test
ioeric added inline comments.
Comment at: clang-query/QueryReplace.cpp:1
+#include "QueryReplace.h"
+#include "QueryParser.h"
Please add license header.
Comment at: clang-query/QueryReplace.cpp:37
+
+llvm::ErrorOr QueryReplaceSpec::parseFromJSO
klimek added inline comments.
Comment at: clang-query/QueryReplace.cpp:50
+
+void QueryReplaceTool::addOperation(clang::query::QueryReplaceSpec &Spec) {
+ ast_matchers::dynamic::Diagnostics Diag;
Shouldn't that also just return the error?
Comm
jbangert created this revision.
Herald added a subscriber: mgorny.
This requires https://reviews.llvm.org/D29613. It adds a new tool,
clang-query-replace that replaces and AST node with the result of evaluating a
simple template language.
https://reviews.llvm.org/D29622
Files:
clang-query/C