[PATCH] D102488: [clang][deps] Prune unused header search paths

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 21 08:34:01 PDT 2021


jansvoboda11 marked an inline comment as done.
jansvoboda11 added a comment.

This is now ready for review.



================
Comment at: clang/test/ClangScanDeps/Inputs/header-search-pruning/cdb.json:4
+    "directory": "DIR",
+    "command": "clang -E DIR/header-search-pruning.cpp -Ibegin -I1 -Ia -I3 -I4 -I5 -I6 -Ib -I8 -Iend DEFINES -fmodules -fcxx-modules -fmodules-cache-path=DIR/module-cache -fimplicit-modules -fmodule-map-file=DIR/module.modulemap",
+    "file": "DIR/header-search-pruning.cpp"
----------------
The extra numerical include directories here force `AST{Writer,Reader}` to work with multi-byte blob, providing extra test coverage.


================
Comment at: clang/test/ClangScanDeps/header-search-pruning.cpp:27
+// CHECK_A:                "-I",
+// CHECK_A-NEXT:           "begin",
+// CHECK_A-NEXT:           "-I",
----------------
The `being` and `end` include directories here are sentinels that make it easier to make positive/negative occurrence checks with `-NEXT`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102488



More information about the cfe-commits mailing list