[clang] [LifetimeSafety] Don't run TU analysis when no lifetime diagnostic is enabled (PR #245557)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 24 07:01:38 PST 2026
Xazax-hun wrote:
> One question: is TU mode meant to be used without inference? The docs present it as a companion to inference, but dangling-field.cpp relies on TU mode producing extra diagnostics even without inference. If TU mode is really meant for inference only, we could consider having one flag imply the other.
I would be very surprised if it produced more diagnostics without inference, it would be nice to investigate why that is happening. I definitely couldn't think of a purpose for using TU analysis when inference is off. The converse, however, makes sense. One can definitely use the inference without the TU analysis.
https://github.com/llvm/llvm-project/pull/245557
More information about the cfe-commits
mailing list