ChuanqiXu9 wrote: > I finally had time to debug this: The reason for modules being involved here > is because the serialization code calls `ParmVarDecl::getDefaultArg()` which > strips the outermost `FullExpr`, such as `ExprWithCleanups`. A potential fix > is in #76473 though I'm not really convinced by this asymmetry between > `getInit()` but calling `setDefaultArg()`. However, removing the handling of > `FullExpr` in `setDefaultArg()` causes a total 29 test failures, so that's > not an (easy) option... > > Personally, I would argue that adding `FullExpressionRAII` makes the code > more robust against the absence of `ExprWithCleanups` so that's maybe a good > thing to have regardless of fixing the serialization code.
Thanks for looking into this. Good enough for me. Yeah the asymmetry between `getInit()` but calling `setDefaultArg()` is a concerning. Also it may be not easy to understand and fix the underlying problem (why getDefaultArg() will strip the outmost `FullExpr`) **properly**. So personally I am fine with the current workaround with a `FIXME`. Let's wait for the opinion from @cor3ntin and @shafik https://github.com/llvm/llvm-project/pull/69076 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits