Don't require us to manually number the statements and expressions in StmtNodes.def. We don't need stable numbers yet, renumbering is a pain, and LAST_STMT had the wrong value anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59300 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 9c06807..2308159 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -29,9 +29,9 @@
// Intialize the table on the first use.
Initialized = true;
-#define STMT(N, CLASS, PARENT) \
- StmtClassInfo[N].Name = #CLASS; \
- StmtClassInfo[N].Size = sizeof(CLASS);
+#define STMT(CLASS, PARENT) \
+ StmtClassInfo[(unsigned)Stmt::CLASS##Class].Name = #CLASS; \
+ StmtClassInfo[(unsigned)Stmt::CLASS##Class].Size = sizeof(CLASS);
#include "clang/AST/StmtNodes.def"
return StmtClassInfo[E];
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index 7529eec..bbd53d0 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -76,7 +76,7 @@
}
void VisitStmt(Stmt *Node);
-#define STMT(N, CLASS, PARENT) \
+#define STMT(CLASS, PARENT) \
void Visit##CLASS(CLASS *Node);
#include "clang/AST/StmtNodes.def"
};