[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 29 14:40:31 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-modules
Author: Matheus Izvekov (mizvekov)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/124997.diff
1 Files Affected:
- (modified) clang/docs/StandardCPlusPlusModules.rst (+23-1)
``````````diff
diff --git a/clang/docs/StandardCPlusPlusModules.rst b/clang/docs/StandardCPlusPlusModules.rst
index 93edce0cf90b76..5154b632fba3a7 100644
--- a/clang/docs/StandardCPlusPlusModules.rst
+++ b/clang/docs/StandardCPlusPlusModules.rst
@@ -710,7 +710,7 @@ Before Clang 19, a change in BMI of any (transitive) dependency would cause the
outputs of the BMI to change. Starting with Clang 19, changes to non-direct
dependencies should not directly affect the output BMI, unless they affect the
results of the compilations. We expect that there are many more opportunities
-for this optimization than we currently have realized and would appreaciate
+for this optimization than we currently have realized and would appreaciate
feedback about missed optimization opportunities. For example,
.. code-block:: c++
@@ -2072,3 +2072,25 @@ Interoperability with Clang Modules
We **wish** to support Clang modules and standard C++ modules at the same time,
but the mixing them together is not well used/tested yet. Please file new
GitHub issues as you find interoperability problems.
+
+Finding reduced test cases
+--------------------------
+
+When the user encounters a problem with the implementation of standard modules,
+it's helpful to attach a reduced test case to the issue report.
+
+This reduction is hard, as it can't avoid the dependency on multiple files,
+unlike most issues which can be reproduced within a single translation unit.
+
+If you are familiar with performing automated reductions using tools like
+c-reduce, you can use `cvise <https://github.com/marxin/cvise>`_ to accomplish this
+reduction.
+
+Much in the same way as creduce, cvise takes an interestingness test
+in addition to the source code. In the latter case, you can create an
+interestingness test which uses your project's build system to perform
+the build part, and cvise will accept multiple source files or directories,
+and will take turns reducing each, which is something creduce does not support.
+
+Be aware that this can be highly compute intensive, but on the upside no manual
+intervention is required.
``````````
</details>
https://github.com/llvm/llvm-project/pull/124997
More information about the cfe-commits
mailing list