[PATCH] D72274: [libTooling] Fix bug in Stencil handling of macro ranges
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 17 08:15:37 PST 2020
ymandel marked 2 inline comments as done.
ymandel added a comment.
In D72274#1826477 <https://reviews.llvm.org/D72274#1826477>, @gribozavr2 wrote:
> The only functional change that I see in this patch is in `clang/lib/Tooling/Transformer/Stencil.cpp`. However, I don't understand how that change in the (deprecated) selection() stencil can affect other stencils.
Good point. Actually, `selection` and `text` are still used internally. See, for example, lines 301-303 in Stencil.cpp. We deprecated their use for clients.
================
Comment at: clang/unittests/Tooling/StencilTest.cpp:375
+ double foo(double d);
+ foo(MACRO);)cpp";
+
----------------
gribozavr2 wrote:
> "foo(MACRO);" will fail parsing at the top level, it should be within a function, I think.
`matchStmt` *(below) handles wrapping the snippet in a function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72274/new/
https://reviews.llvm.org/D72274
More information about the cfe-commits
mailing list