[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 8 03:12:34 PST 2024
================
@@ -2393,6 +2393,25 @@ static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
Kind))
return false;
}
+ } else if (!Constructor->isDelegatingConstructor()) {
+ for (const Decl *decl : RD->decls()) {
+ if (const auto *inner = dyn_cast<CXXRecordDecl>(decl)) {
----------------
Fznamznon wrote:
Code-style NIT, the names of the variables should start from a capital.
```suggestion
if (const auto *Inner = dyn_cast<CXXRecordDecl>(Decl)) {
```
https://github.com/llvm/llvm-project/pull/81042
More information about the cfe-commits
mailing list