[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 10:58:26 PST 2024


hokein wrote:

> Sorry for missing this!
> 
> Would be nice to have a testcase but I see it's hard to get into the crashing state (maybe even not possible via clang). Seems worthwhile to be robust to such conditions and getDefaultArgRange appears less fragile.

This fix was needed for the initial type-alias CTAD implementation, we don't need it anymore in the new implementation :)

We could drop this change, but I think it is worth having it, it is an improvement, and make the code more robust.

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


More information about the cfe-commits mailing list