Request: Treat UnconditionalSuppressMessageAttribute
like SuppressMessageAttribute
#48885
Milestone
UnconditionalSuppressMessageAttribute
like SuppressMessageAttribute
#48885
History:
SuppressMessageAttribute
has aConditionalAttribute
on it so it doesn't get emitted. But tools like the linker need a way for code to suppress warnings and a way to see those suppressions in the final binaries.UnconditionalSuppressMessage was added for this purpose.
We're now trying to add analyzers to produce the same warnings that the linker produces, but at build time. If the analyzer infrastructure doesn't recognize
UnconditionalSuppress
users will have to annotate their code twice (and it will cause new previously suppressed warnings to appear when we turn on the analyzer).Overall, we think this is critical for the linker to be successful in the .NET 6 epic of producing a good trimming experience (dotnet/runtime#43543).
The text was updated successfully, but these errors were encountered: