[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
Thu Jan 14 03:00:51 PST 2021


steakhal added a comment.

It seems quite a challenge to hook the `Preprocessor` for all possible configurations for every `CompilerInvocation`.
The underlying machinery is somewhat complex and spaghetti to me.

Here is what I suggest:
For now, this expansion is better than the previous was. Macro expansions will work for the main TU even in any CTU configuration. For the imported TUs, it will just not expand any macros.
This is a regression in some way, but we should live with that until we implement it completely.
I think the users would prefer a non-crashing partial implementation to a crashing one.

If you think it's an appropriate, I will update the CTU tests to expect no macro expansion in any imported TU.
And also remove the `XFAIL`.
This way we could still target clang-12.

Do you think it's acceptable?
@xazax.hun @NoQ


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

https://reviews.llvm.org/D93224



More information about the cfe-commits mailing list