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 3711 Build 3711: arc lint + arc unit
Event Timeline
| clang-query/QueryReplace.cpp | ||
|---|---|---|
| 1 | Please add license header. | |
| 37 | I'd prefer using llvm::Expected<T> with an llvm::StringError. | |
| 58 | return error here? Consider using llvm::Error with llvm::StringError. | |
| 72 | Missing // namespace ... | |
| clang-query/replace-tool/ClangQueryReplace.cpp | ||
| 76 | If this parses yaml string, shouldn't it be called parseFromYAML instead? | |
| clang-query/QueryReplace.h | ||
|---|---|---|
| 35–36 | 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 | ||
|---|---|---|
| 35–36 | 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 :)