[clang] Reapply [Clang] Implement P2843R3 - Preprocessing is never undefined (PR #196989)

Yihan Wang via cfe-commits cfe-commits at lists.llvm.org
Wed May 20 08:17:18 PDT 2026


yronglin wrote:

> > Thanks Aaron explaining the reason! and also thank you report this issue.
> > > `-Werror` means this is not a breaking change, it's the user getting the behavior they asked for.
> > 
> > 
> > This is exactly what I was thinking.
> > Given that this PR has already been reverted twice, I would like to propose posting an RFC to the community—if deemed necessary—in order to gather as much feedback as possible. This would also help minimize the impact on users, ensuring a smooth transition for them.
> > WDYT?
> 
> If the goal is feedback on how disruptive this will be, I think a better approach would be trying to build a massive corpus of code (like a distro worth of packages) to see what the fallout will be and go from there. I suspect an RFC will get quick agreement that we want to strengthen diagnostics here when possible but without being disruptive, which we already basically know today; what's unknown is "without being disruptive". That said, I don't think an RFC is a bad idea either, mostly just that it'll help to have as much information up front as you can get.

Agree 100%, I have create a RFC. https://discourse.llvm.org/t/rfc-default-on-diagnostics-for-implement-p2843r3-preprocessing-is-never-undefined/90863

I hope someone can point out issues or potential risks in the RFC that we may have overlooked.

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


More information about the cfe-commits mailing list