[clang] [serialization] No transitive type change (PR #92511)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 20 03:54:31 PDT 2024


================
@@ -44,10 +44,6 @@ export inline int getA() {
     return 43;
 }
 
-export inline int getA2(int) {
----------------
ChuanqiXu9 wrote:

Previously, in `m-partA.v1.cppm`, we add a new declaration `int getA(int);`. And what we want to test is, the BMI of `useBOnly.cppm` shouldn't change after we change `m-partA.cppm` to `m-partA.v1.cppm`.

However, previously, if we lack the declaration for `int getA2(int)`, the new declaration `int getA(int)` in `m-partA.v1.cppm` would create a new function type `int *(int)`. Then (previously) the changes to type are transitive, so the BMI of `useBOnly.cppm`  will change after all. 

And now, after we made this patch, we can get rid of above logic.
So this change is not necessary but I'd like to make it since it makes the test more robust.

https://github.com/llvm/llvm-project/pull/92511


More information about the cfe-commits mailing list