================
@@ -2262,15 +2261,34 @@ CheckConstexprFunctionStmt(Sema &SemaRef, const 
FunctionDecl *Dcl, Stmt *S,
     //   - null statements,
     return true;
 
-  case Stmt::DeclStmtClass:
+  case Stmt::DeclStmtClass: {
+    auto *DS = cast<DeclStmt>(S);
+
+    // Expansion statement 'declarations' have substatements, so we need to
+    // handle them separately.
+    if (DS->isSingleDecl()) {
----------------
cor3ntin wrote:

nit: you could return early there, to limit the nesting

https://github.com/llvm/llvm-project/pull/217110
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to