[clang] [clang][sema][wat] peek through expansion statements to try and fix weird decl problems (PR #211745)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 07:26:24 PDT 2026


Sirraide wrote:

To elaborate, the unfortunate situation that we have w/ expansion statements is that they need to be a new DeclContext because we need a dependent DeclContext to mark that we’re effectively in a template. This means that for some declarations in a function... the enclosing DeclContext is no longer that of the function (assuming the expansion statement hasn’t been expanded yet), which breaks code... everywhere that assumes that this is the case for, well, anything declared inside a function

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


More information about the cfe-commits mailing list