[PATCH] D93224: [RFC][analyzer] Use the MacroExpansionContext for macro expansions in plists

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 13 01:31:43 PST 2021


steakhal added a comment.

In D93224#2493710 <https://reviews.llvm.org/D93224#2493710>, @steakhal wrote:

> In D93224#2493515 <https://reviews.llvm.org/D93224#2493515>, @xazax.hun wrote:
>
>> Could you validate that this solution works for the latter [ctu-on-demand]?
>
> Sure, I suspect that will have the required PP events since the Preprocessor is parsing source code :D
> I'm going to check this just to be sure.

On-demand parsing does indeed populate the required PP events.
The 4-th element of this patch stack will aim to implement macro expansions for that scenario.

In D93224#2493515 <https://reviews.llvm.org/D93224#2493515>, @xazax.hun wrote:

> If we really want to make it work for the CTU mode with dumps, we could dump the macro expansions to a separate file together with the AST and read it back for the error reporting.

I don't know. Theoretically yes, but I'm not sure how much of a breaking change would it be.
Do we really promise ABI compatibility for AST dumps? If we support it to some extent, then we would have a problem - which would mean that we can not target clang-12 anymore with this patch stack.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93224/new/

https://reviews.llvm.org/D93224



More information about the cfe-commits mailing list