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.
Details
Diff Detail
- Build Status
Buildable 5336 Build 5336: arc lint + arc unit
Event Timeline
| clang-query/QueryReplace.cpp | ||
|---|---|---|
| 2 | Please add license header. | |
| 38 | I'd prefer using llvm::Expected<T> with an llvm::StringError. | |
| 59 | return error here? Consider using llvm::Error with llvm::StringError. | |
| 73 | Missing // namespace ... | |
| clang-query/replace-tool/ClangQueryReplace.cpp | ||
| 77 | If this parses yaml string, shouldn't it be called parseFromYAML instead? | |
| clang-query/QueryReplace.h | ||
|---|---|---|
| 36–37 | In the other change the identifier was specified with ${identifier}, not %"identifier". | |
Thank you for the feedback, addressed and reformatted using llvm style.
| clang-query/QueryReplace.h | ||
|---|---|---|
| 36–37 | I edited the comment for consistency. This indeed has an older syntax. | |
This doesn't seem to come up in the test? (and I don't understand what it's trying to tell me :)