================
@@ -57,26 +58,24 @@ using namespace clang;
 #define ABSTRACT_STMT(STMT)
 #include "clang/AST/StmtNodes.inc"
 
-static struct StmtClassNameTable {
+struct StmtClassNameTable {
   const char *Name;
   unsigned Counter;
   unsigned Size;
-} StmtClassInfo[Stmt::lastStmtConstant+1];
+};
 
 static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
-  static bool Initialized = false;
-  if (Initialized)
-    return StmtClassInfo[E];
-
-  // Initialize the table on the first use.
-  Initialized = true;
+  static std::array<StmtClassNameTable, Stmt::lastStmtConstant + 1>
+      stmtClassInfo = []() {
----------------
RIscRIpt wrote:

Removed.

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

Reply via email to