diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -669,9 +669,6 @@ return true; } -#define DISPATCH(NAME, CLASS, VAR) \ - return getDerived().Traverse##NAME(static_cast(VAR)) - template bool RecursiveASTVisitor::TraverseType(QualType T) { if (T.isNull()) @@ -681,7 +678,8 @@ #define ABSTRACT_TYPE(CLASS, BASE) #define TYPE(CLASS, BASE) \ case Type::CLASS: \ - DISPATCH(CLASS##Type, CLASS##Type, const_cast(T.getTypePtr())); + return getDerived().Traverse##CLASS##Type( \ + static_cast(const_cast(T.getTypePtr()))); #include "clang/AST/TypeNodes.inc" } @@ -731,8 +729,6 @@ return true; } -#undef DISPATCH - template bool RecursiveASTVisitor::TraverseNestedNameSpecifier( NestedNameSpecifier *NNS) {