[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 20 19:25:26 PST 2025


vsapsai wrote:

That crash looks pretty annoying, thanks for looking into this issue and debugging it.

Can you trigger the crash without `-ast-dump-all`? If there is a way to detect a faulty behaviour without verifying the internal compiler state, it is more reliable and less fragile to do it this way.

Can you use in the test `%clang_cc1` instead of `%clang`? The reason is that `%clang` invokes the driver and its behaviour depends on the environment in which it is executed. For example, `%clang` would read environment variables while `%clang_cc1` expects extra configuration to be passed explicitly. And for the testing the explicit behaviour is more predictable and reproducible.

https://github.com/llvm/llvm-project/pull/114240


More information about the cfe-commits mailing list