[libTooling] In Clang Transformer, change `Metadata` field to deferred evalutaion
authorYitzhak Mandelbaum <yitzhakm@google.com>
Mon, 20 Jul 2020 21:16:39 +0000 (21:16 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Mon, 20 Jul 2020 21:17:09 +0000 (21:17 +0000)
commitc0b8954ecba500e3d9609152295b74ccd7d89d62
tree79a792d70a2b8560f5a8577baadaaf8639262386
parent917f8421591d2cc53c48ebd17d88b0dd3255aa2c
[libTooling] In Clang Transformer, change `Metadata` field to deferred evalutaion

`Metadata` is being changed from an `llvm::Any` to a `MatchConsumer<llvm;:Any>`, so that it's evaluation can be be dependent on `MatchResult`s passed in.

Reviewed By: ymandel, gribozavr2

Differential Revision: https://reviews.llvm.org/D83820
clang/include/clang/Tooling/Transformer/RewriteRule.h
clang/lib/Tooling/Transformer/RewriteRule.cpp
clang/unittests/Tooling/TransformerTest.cpp