nickdesaulniers wrote:

I'd be curious @AaronBallman 's thoughts on having note diagnostics like this 
where the note encourages you to enable debug info for better (more precise) 
diagnostics. I don't think there's _any_ prior art in Clang here.

If @AaronBallman is cool with the idea, then towards the goal of improved 
ergonomics, I'd be curious if we could push further and not even have/add 
`-fdiagnostics-show-inlining-chain` at all; attach the note on instances of 
`-Werror`/`-Wwarning` that `-gline-directives-only` (and higher) can give you 
additional info (hopefully the presence of debug info doesn't change inlining 
decisions :P).

If @AaronBallman is not cool with the idea, then I think this PR has to be 
scuttled.

Previously @AaronBallman has expressed that diagnostics should not differ 
between optimization levels.  I think there's a subtle difference here; for 
_backend_ diagnostics, encouraging the user to enable debug info can add 
additional/helpful notes, in this case for potentially stopping buffer 
overflows _known at compile time_ (for the Linux kernel's implementation of 
FORTIFY_SOURCE) for which clang is currently _strictly worse than GCC here_.

@AaronBallman what are your thoughts here?

https://github.com/llvm/llvm-project/pull/174892
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to