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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to