Skip to content

Commit ea6f1cb

Browse files
committed
[clang] C++20 Modules: document how to perform automated reductions
1 parent 608012a commit ea6f1cb

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

clang/docs/StandardCPlusPlusModules.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ Before Clang 19, a change in BMI of any (transitive) dependency would cause the
710710
outputs of the BMI to change. Starting with Clang 19, changes to non-direct
711711
dependencies should not directly affect the output BMI, unless they affect the
712712
results of the compilations. We expect that there are many more opportunities
713-
for this optimization than we currently have realized and would appreaciate
713+
for this optimization than we currently have realized and would appreaciate
714714
feedback about missed optimization opportunities. For example,
715715

716716
.. code-block:: c++
@@ -2072,3 +2072,25 @@ Interoperability with Clang Modules
20722072
We **wish** to support Clang modules and standard C++ modules at the same time,
20732073
but the mixing them together is not well used/tested yet. Please file new
20742074
GitHub issues as you find interoperability problems.
2075+
2076+
Finding reduced test cases
2077+
--------------------------
2078+
2079+
When the user encounters a problem with the implementation of standard modules,
2080+
it's helpful to attach a reduced test case to the issue report.
2081+
2082+
This reduction is hard, as it can't avoid the dependency on multiple files,
2083+
unlike most issues which can be reproduced within a single translation unit.
2084+
2085+
If you are familiar with performing automated reductions using tools like
2086+
c-reduce, you can use `cvise <https://github.com/marxin/cvise>`_ to accomplish this
2087+
reduction.
2088+
2089+
Much in the same way as creduce, cvise takes an interestingness test
2090+
in addition to the source code. In the latter case, you can create an
2091+
interestingness test which uses your project's build system to perform
2092+
the build part, and cvise will accept multiple source files or directories,
2093+
and will take turns reducing each, which is something creduce does not support.
2094+
2095+
Be aware that this can be highly compute intensive, but on the upside no manual
2096+
intervention is required.

0 commit comments

Comments
 (0)