jansvoboda11 added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5660
+        "-header-include-filtering=" +
+        std::string(D.CCPrintHeadersFiltering ? "on" : "off")));
   }
----------------
Let's change "on" to something that won't interfere with potential future 
filters. How about "no-transitive-system"? (or "only-direct-system" if that 
better fits the semantics)

Same for the command-line counterpart.


================
Comment at: clang/lib/Frontend/HeaderIncludeGen.cpp:161
+  case HIF_Textual: {
+    assert(!DepOpts.HeaderIncludeFiltering &&
+           "header filtering is currently always disabled when output format 
is"
----------------
I don't think asserting on invalid user input is a good strategy. Let's emit a 
diagnostic and exit gracefully instead.


================
Comment at: clang/tools/driver/driver.cpp:278
+        (TheDriver.CCPrintHeadersFormat == HIF_JSON && !Filtering)) {
+      llvm::errs()
+          << "error: unsupported configuration: "
----------------
This should probably be a proper diagnostic.


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

Reply via email to