[PATCH] D82760: RecursiveASTVisitor: inline a macro that is only used once
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 08:37:14 PDT 2020
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82760.274140.patch
Type: text/x-patch
Size: 1205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200629/e1563189/attachment-0001.bin>
More information about the cfe-commits
mailing list