ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Looks good. Could you also add test cases where `ReplaceNodeWithTemplate::create` fails to parse templates? https://reviews.llvm.org/D29621