[clang] [Clang] Preserve original arguments in constexpr call diagnostics (PR #239911)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 12 04:58:01 PST 2026


AaronBallman wrote:

> > I don't have a strong opinion apart from two small nits. This makes every function call slower of course, but improves the diagnostics.
> 
> Thanks! I've addressed both nits in the latest commit.
> 
> I understand the potential performance impact of the additional overhead on function calls. However, I haven't found an alternative approach that improves the diagnostics without introducing this overhead.
> 
> Thanks again for taking the time to review!

How much performance impact are we talking, though? Should this be put up on https://llvm-compile-time-tracker.com/ to measure the impact? My intuition is that this might be too costly; there are a *lot* of constexpr function calls in some TUs and they're almost always going to be correct (you may get 1-2 that have diagnostics occasionally, but then those diagnostics get fixed). However, intuition and performance do not go well together. :-D

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


More information about the cfe-commits mailing list