[clang] [LifetimeSafety][test] Fix UUM of fields added in #221610 and #205764 (PR #221843)

Thurston Dang via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 7 15:13:05 PDT 2026


thurstond wrote:

> This looks good but I wonder if we should also have default initialisers in LifetimeSafetyOpts as well to avoid problems like this in the future.

This issue only occurs in the test. Normally LifetimeSafetyOpts are constructed via GetLifetimeSafetyOpts, which sets the values appropriately:

https://github.com/llvm/llvm-project/blob/f7ce52f0f4ec943bfdc749bc67de00a1e3ece6bc/clang/lib/Sema/SemaLifetimeSafety.h#L120-L131

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


More information about the cfe-commits mailing list