This revision was automatically updated to reflect the committed changes. Closed by commit rG58f2be9671a8: RecursiveASTVisitor: inline a macro that is only used once (authored by gribozavr).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82760/new/ https://reviews.llvm.org/D82760 Files: clang/include/clang/AST/RecursiveASTVisitor.h Index: clang/include/clang/AST/RecursiveASTVisitor.h =================================================================== --- clang/include/clang/AST/RecursiveASTVisitor.h +++ clang/include/clang/AST/RecursiveASTVisitor.h @@ -669,9 +669,6 @@ return true; } -#define DISPATCH(NAME, CLASS, VAR) \ - return getDerived().Traverse##NAME(static_cast<CLASS *>(VAR)) - template <typename Derived> bool RecursiveASTVisitor<Derived>::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<Type *>(T.getTypePtr())); + return getDerived().Traverse##CLASS##Type( \ + static_cast<CLASS##Type *>(const_cast<Type *>(T.getTypePtr()))); #include "clang/AST/TypeNodes.inc" } @@ -731,8 +729,6 @@ return true; } -#undef DISPATCH - template <typename Derived> bool RecursiveASTVisitor<Derived>::TraverseNestedNameSpecifier( NestedNameSpecifier *NNS) {
Index: clang/include/clang/AST/RecursiveASTVisitor.h =================================================================== --- clang/include/clang/AST/RecursiveASTVisitor.h +++ clang/include/clang/AST/RecursiveASTVisitor.h @@ -669,9 +669,6 @@ return true; } -#define DISPATCH(NAME, CLASS, VAR) \ - return getDerived().Traverse##NAME(static_cast<CLASS *>(VAR)) - template <typename Derived> bool RecursiveASTVisitor<Derived>::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<Type *>(T.getTypePtr())); + return getDerived().Traverse##CLASS##Type( \ + static_cast<CLASS##Type *>(const_cast<Type *>(T.getTypePtr()))); #include "clang/AST/TypeNodes.inc" } @@ -731,8 +729,6 @@ return true; } -#undef DISPATCH - template <typename Derived> bool RecursiveASTVisitor<Derived>::TraverseNestedNameSpecifier( NestedNameSpecifier *NNS) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits