jansvoboda11 requested review of this revision.
jansvoboda11 added a comment.

Re-requesting review, since the test does cover the changes to 
`ModuleDepCollector.cpp`.



================
Comment at: clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template:4
+    "directory": "DIR",
+    "command": "clang -fsyntax-only DIR/tu.c -fmodules -fimplicit-module-maps 
-fmodules-cache-path=DIR/cache -include DIR/header.h -o DIR/tu.o",
+    "file": "DIR/tu.c"
----------------
dexonsmith wrote:
> It looks to me like that this test would have passed before the code change, 
> since there was already logic for dropping `-include`. Can you also add some 
> other argument(s) that wouldn't have been dropped before, but will be now?
Only the `-include-pch` argument was being dropped 
(`PreprocessorOptions::ImplicitPCHInclude`). The `-include` arguments 
(`PreprocessorOptions::Includes`) were being preserved. This test would not 
pass without the changes to `ModuleDepCollector.cpp`.

I can add checks for other arguments that are being dropped now that weren't 
before, but assuming `resetNonModularOptions` are already being tested 
elsewhere, I don't think there's much value in that.


================
Comment at: clang/test/ClangScanDeps/removed-args.c:3
+// RUN: cp %S/Inputs/removed-args/* %t
+
+// RUN: sed "s|DIR|%/t|g" %S/Inputs/removed-args/cdb.json.template > 
%t/cdb.json
----------------
dexonsmith wrote:
> Please add a comment here explaining what args are expected to be dropped and 
> why, to help future readers to understand the testcase.
Will do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108710/new/

https://reviews.llvm.org/D108710

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to