================
@@ -946,6 +952,13 @@ class DiagnosticsEngine : public 
RefCountedBase<DiagnosticsEngine> {
     return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this);
   }
 
+  /// Diagnostic suppression mappings can be used to ignore diagnostics based 
on
+  /// the file they occur in.
+  /// These take presumed locations into account, and can still be overriden by
+  /// clang-diagnostics pragmas.
+  void setDiagSuppressionMapping(decltype(DiagSuppressionMapping) Mapping);
----------------
ilya-biryukov wrote:

This extension point looks very powerful and I would be vary of adding it to 
the public APIs.
I'm worried that we are opening up the flood gates to the API that will be 
misused.

Have you thought about restricting the public API of the DiagnosticsEngine 
somewhat?
Simply having a concrete class that can only be produced by parsing the 
diagnostics file is already enough to ensure some discussion will happen before 
new use-cases for this arise.

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