================
@@ -0,0 +1,92 @@
+============================
+Warning suppression mappings
+============================
+
+.. contents::
+   :local:
+
+Introduction
+============
+
+Warning suppression mappings enables users to suppress clang's diagnostics in a
+per-file granular manner. Enabling enforcement of diagnostics in specific parts
+of the project, even if there are violations in dependencies or other parts of
+the codebase.
+
+Goal and usage
+==============
+
+Clang allows diagnostics to be configured at a translation-unit granularity.
+If a foo.cpp is compiled with -Wfoo, all transitively included headers also 
need
+to be clean. Hence turning on new warnings at large codebases is quite 
difficult
+today:
+- It requires cleaning up all the existing warnings, which might not be 
possible
+  when some dependencies aren't in project owner's control.
+- Preventing backsliding in the meanwhile as the diagnostic can't be enforced 
at
+  all until codebase is cleaned up.
----------------
AaronBallman wrote:

This bullet is more related to the first bullet and less about difficulties 
enabling a new warning, right? e.g., if you can't enable the new warning, you 
run the risk of introducing more code that would trigger the warning, making it 
harder to enable the warning later because you need to fix even more places. 
Maybe it should be worked in to the first bullet and then we remove the 
bulleted list?

https://github.com/llvm/llvm-project/pull/112517
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to