[PATCH] D121591: [C++20][Modules][Driver][HU 4/N] Add fdirectives-only mode for preprocessing output.

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 14 20:24:54 PDT 2022


ChuanqiXu added a comment.

Oh, I found all the series of patches looks confusing to me. Maybe due to that I lack a use experience with header unit. I really couldn't judge if it is necessary or useful. Could you elaborate more **end** use cases? For example, I could understand the sentence:

> Thus it preserves macros that are still live after such processing.
> This output can be consumed by a second compilation to produce a header unit.

But where could it be useful? I think this is worth mentioning.

---

Note: After the 2 series of patches, I think it is necessary to edit the Release Note and the command line documents.



================
Comment at: clang/test/Driver/cxx20-fdirectives-only.cpp:10
+// RUN: %clang++ -### -std=c++20 -E -fmodule-header=user foo.hh  2>&1 | \
+// RUN:   FileCheck -check-prefix=CHECK-HU %s
+
----------------
Maybe it's worth to add a test:
```
%clang++ -### -std=c++20 -fmodule-header=user foo.hh  2>&1
```

And check not for `-fdirectives-only`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121591



More information about the cfe-commits mailing list