From: Alexander Kornienko Date: Fri, 1 Feb 2013 12:35:51 +0000 (+0000) Subject: Use const visitors in ASTDumper. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae54121c15cdd38f415f6fdda48215ab5e4dcee1;p=clang Use const visitors in ASTDumper. http://llvm-reviews.chandlerc.com/D355 Patch by Philip Craig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174171 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclVisitor.h b/include/clang/AST/DeclVisitor.h index f869e49e5a..67be74bfdc 100644 --- a/include/clang/AST/DeclVisitor.h +++ b/include/clang/AST/DeclVisitor.h @@ -20,15 +20,21 @@ #include "clang/AST/DeclTemplate.h" namespace clang { +namespace declvisitor { -#define DISPATCH(NAME, CLASS) \ - return static_cast(this)-> Visit##NAME(static_cast(D)) +template struct make_ptr { typedef T *type; }; +template struct make_const_ptr { typedef const T *type; }; /// \brief A simple visitor class that helps create declaration visitors. -template -class DeclVisitor { +template