[clang] [Clang] Diagnose conflict between always_inline/noinline attributes (PR #215173)
Kenzo Tjandra via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 19:52:48 PDT 2026
ketjandr wrote:
> > > This changes seem to cause compiling errors for us when `#pragma clang optimize off` is active and we have `always_inline` lambdas. We do not hit this issue when we have `always_inline` functions. Should we also account for lambdas in this case?
> >
> >
> > Yes, I think we should. Looks like lambdas were silently inheriting both `noinline` and `alwaysinline` before adding the mutual exclusions for `noinline`/`alwaysinline`, this patch just made it fail loudly. Regular functions with `alwaysinline` didn't fail since we would skip adding `noinline` even with optimizations off, I believe the fix should be to ensure lambdas follow the same pattern.
> > I'm happy to make this follow-up patch. Should we raise a new issue, or open a new PR?
>
> I don't have a preference. opening a new PR would be cool with me. thank you! :)
Sounds good, I opened a PR for this #217194
https://github.com/llvm/llvm-project/pull/215173
More information about the cfe-commits
mailing list