r209245 - RAV reunification: merge DISPATCH_STMT() macro back to standard RAV
Alp Toker
alp at nuanti.com
Tue May 20 15:03:28 PDT 2014
Author: alp
Date: Tue May 20 17:03:27 2014
New Revision: 209245
URL: http://llvm.org/viewvc/llvm-project?rev=209245&view=rev
Log:
RAV reunification: merge DISPATCH_STMT() macro back to standard RAV
Also add the missing undef in both files.
Modified:
cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=209245&r1=209244&r2=209245&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Tue May 20 17:03:27 2014
@@ -531,6 +531,8 @@ bool RecursiveASTVisitor<Derived>::Trave
return true;
}
+#undef DISPATCH_STMT
+
template <typename Derived>
bool RecursiveASTVisitor<Derived>::TraverseType(QualType T) {
if (T.isNull())
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=209245&r1=209244&r2=209245&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Tue May 20 17:03:27 2014
@@ -554,6 +554,8 @@ bool RecursiveASTVisitor<Derived>::Trave
if (!S)
return true;
+#define DISPATCH_STMT(NAME, CLASS, VAR) DISPATCH(NAME, CLASS, VAR)
+
if (getDerived().shouldUseDataRecursionFor(S))
return dataTraverse(S);
@@ -564,7 +566,7 @@ bool RecursiveASTVisitor<Derived>::Trave
switch (BinOp->getOpcode()) {
#define OPERATOR(NAME) \
case BO_##NAME: \
- DISPATCH(Bin##NAME, BinaryOperator, S);
+ DISPATCH_STMT(Bin##NAME, BinaryOperator, S);
BINOP_LIST()
#undef OPERATOR
@@ -572,7 +574,7 @@ bool RecursiveASTVisitor<Derived>::Trave
#define OPERATOR(NAME) \
case BO_##NAME##Assign: \
- DISPATCH(Bin##NAME##Assign, CompoundAssignOperator, S);
+ DISPATCH_STMT(Bin##NAME##Assign, CompoundAssignOperator, S);
CAO_LIST()
#undef OPERATOR
@@ -582,7 +584,7 @@ bool RecursiveASTVisitor<Derived>::Trave
switch (UnOp->getOpcode()) {
#define OPERATOR(NAME) \
case UO_##NAME: \
- DISPATCH(Unary##NAME, UnaryOperator, S);
+ DISPATCH_STMT(Unary##NAME, UnaryOperator, S);
UNARYOP_LIST()
#undef OPERATOR
@@ -597,13 +599,15 @@ bool RecursiveASTVisitor<Derived>::Trave
#define ABSTRACT_STMT(STMT)
#define STMT(CLASS, PARENT) \
case Stmt::CLASS##Class: \
- DISPATCH(CLASS, CLASS, S);
+ DISPATCH_STMT(CLASS, CLASS, S);
#include "clang/AST/StmtNodes.inc"
}
return true;
}
+#undef DISPATCH_STMT
+
template <typename Derived>
bool RecursiveASTVisitor<Derived>::TraverseType(QualType T) {
if (T.isNull())
More information about the cfe-commits
mailing list