[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 09:13:14 PST 2024


================
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions &DiagOpts) {
   DiagOpts.ShowCarets = false;
   // Don't write out diagnostic file.
   DiagOpts.DiagnosticSerializationFile.clear();
-  // Don't emit warnings as errors (and all other warnings too).
-  DiagOpts.IgnoreWarnings = true;
+  // Don't emit warnings except for scanning specific warnings.
+  // TODO: It would be useful to add a more principled way to ignore all
+  //       warnings that come from source code. The issue is that we need to
+  //       ignore warnings that could be surpressed by
+  //       `#pragma clang diagnostic`, while still allowing some scanning
+  //       warnings for things we're not ready to turn into errors yet.
----------------
benlangmuir wrote:

I'm concerned about removing `IngoreWarnings = true`.  There are lots of default warnings we may not want.  Also this would allow `#pragma clang diagnostic` to  **promote** arbitrary diagnostics to errors.

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


More information about the cfe-commits mailing list