[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81225)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 02:17:31 PST 2024


Fznamznon wrote:

> @Fznamznon in non-template version `else if (!Constructor->isDependentContext() &&!Constructor->isDelegatingConstructor())` this is the check that is performed and `isDependentContext` is true for templates, so I have separate condition for template versions. I'm doing the same thing as non-templated version just in different if condition.

I understand that templates are dependent contexr. I was wondering why do we have `!Constructor->isDependentContext()` condition at all. If we do the same thing, why do we need a spare condition at all?

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


More information about the cfe-commits mailing list