================
@@ -0,0 +1,584 @@
+//===-- SemaExpand.cpp - Semantic Analysis for Expansion 
Statements--------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+//  This file implements semantic analysis for C++26 expansion statements,
+//  aka 'template for'.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/DeclCXX.h"
+#include "clang/AST/DynamicRecursiveASTVisitor.h"
+#include "clang/AST/ExprCXX.h"
+#include "clang/AST/StmtCXX.h"
+#include "clang/Lex/Preprocessor.h"
+#include "clang/Sema/Lookup.h"
+#include "clang/Sema/Overload.h"
+#include "clang/Sema/Sema.h"
+
+#include <clang/Sema/EnterExpressionEvaluationContext.h>
+#include <clang/Sema/Template.h>
+
+using namespace clang;
+using namespace sema;
+
+namespace {
+struct IterableExpansionStmtData {
+  enum class State {
+    NotIterable,
+    Error,
+    Ok,
+  };
+
+  DeclStmt *RangeDecl{};
+  DeclStmt *BeginDecl{};
+  DeclStmt *EndDecl{};
+  Expr *Initializer{};
----------------
zyn0217 wrote:

```suggestion
  DeclStmt *RangeDecl = nullptr;
```
ditto elsewhere - there's a preference of not using brace initializers per our 
coding style

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

Reply via email to