[clang] Make [[clang::lifetimebound]] work for expressions coming from default arguments (PR #112047)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 15:59:41 PDT 2024


zygoloid wrote:

> I expect that won't be caught, and you'll need to make a similar change to `visitLocalsRetainedByInitializer` to handle it.

Actually, maybe the best thing would be to change `visitFunctionCallArguments` to step over `CXXDefaultArgExpr` in `Args`. That should cover both cases, and the only place we should see a `CXXDefaultArgExpr` is at the top level in some form of function call.

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


More information about the cfe-commits mailing list