jansvoboda11 added inline comments.
================ Comment at: clang/lib/Frontend/HeaderIncludeGen.cpp:161 + case HIF_Textual: { + assert(!DepOpts.HeaderIncludeFiltering && + "header filtering is currently always disabled when output format is" ---------------- ahatanak wrote: > jansvoboda11 wrote: > > I don't think asserting on invalid user input is a good strategy. Let's > > emit a diagnostic and exit gracefully instead. > The combination of `(textual,filtering)` is rejected by the driver, so the > assertion should always succeed if the user invoked the driver and set the > environment variables. Do we need a diagnostic for the case where > `-header-include-format` and `-header-include-filtering` are passed on the > CC1 command line by the user? Ah, you're right about the driver. Yes. I think we should emit a diagnostic when this is passed to cc1 on the command line. Good place for this might be `ParseDependencyOutputArgs` in `CompilerInvocation.cpp`, after the marshalling layer populates the `DependencyOutputOptions` fields. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137996/new/ https://reviews.llvm.org/D137996 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits