r209091 - Begin RAV reunification: s/DataRecursiveASTVisitor/RecursiveASTVisitor/

Argyrios Kyrtzidis kyrtzidis at apple.com
Sun May 18 12:29:53 PDT 2014


Hi Alp,

Thanks for doing this!

I'm not sure what your long-term plan is but I recommend making RAV data recursive and changing its interface accordingly (add *Before/*After visitation callbacks and have clients adopt them, etc.).
Having it code recursive is just a minefield of stack overflows.

On May 18, 2014, at 11:38 AM, Alp Toker <alp at nuanti.com> wrote:

> Author: alp
> Date: Sun May 18 13:38:08 2014
> New Revision: 209091
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=209091&view=rev
> Log:
> Begin RAV reunification: s/DataRecursiveASTVisitor/RecursiveASTVisitor/
> 
> Define a macro to reduce the delta between RecursiveASTVisitor and
> DataRecursiveASTVisitor.
> 
> Some years ago, someone thought it was a good idea to copy the entire RAV to
> support cursor visitation in libclang.
> 
> Since then the two have diverged needlessly and the rest is history.
> 
> This series of commits aims to reduce delta between the two so that we can
> reason about their differences, apply bugfixes that were only made to one but
> not the other, and ultimately find a way to unify two two chunks of code.
> 
> Modified:
>    cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
> 
> Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=209091&r1=209090&r2=209091&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
> +++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Sun May 18 13:38:08 2014
> @@ -69,9 +69,13 @@
> 
> namespace clang {
> 
> +// Reduce the diff between RecursiveASTVisitor / DataRecursiveASTVisitor to
> +// make it easier to track changes and keep the two in sync.
> +#define RecursiveASTVisitor DataRecursiveASTVisitor
> +
> // A helper macro to implement short-circuiting when recursing.  It
> // invokes CALL_EXPR, which must be a method call, on the derived
> -// object (s.t. a user of DataRecursiveASTVisitor can override the method
> +// object (s.t. a user of RecursiveASTVisitor can override the method
> // in CALL_EXPR).
> #define TRY_TO(CALL_EXPR) \
>   do { if (!getDerived().CALL_EXPR) return false; } while (0)
> @@ -141,7 +145,7 @@ namespace clang {
> /// instantiations will be visited at the same time as the pattern
> /// from which they were produced.
> template<typename Derived>
> -class DataRecursiveASTVisitor {
> +class RecursiveASTVisitor {
> public:
>   /// \brief Return a reference to the derived class.
>   Derived &getDerived() { return *static_cast<Derived*>(this); }
> @@ -438,9 +442,9 @@ private:
>   QueuesTy Queues;
> 
>   class NewQueueRAII {
> -    DataRecursiveASTVisitor &RAV;
> +    RecursiveASTVisitor &RAV;
>   public:
> -    NewQueueRAII(StmtsTy &queue, DataRecursiveASTVisitor &RAV) : RAV(RAV) {
> +    NewQueueRAII(StmtsTy &queue, RecursiveASTVisitor &RAV) : RAV(RAV) {
>       RAV.Queues.push_back(&queue);
>     }
>     ~NewQueueRAII() {
> @@ -457,7 +461,7 @@ public:
>   class StmtQueueAction {
>     StmtsTy &CurrQueue;
>   public:
> -    explicit StmtQueueAction(DataRecursiveASTVisitor &RAV)
> +    explicit StmtQueueAction(RecursiveASTVisitor &RAV)
>       : CurrQueue(RAV.getCurrentQueue()) { }
> 
>     void queue(Stmt *S) {
> @@ -470,7 +474,7 @@ public:
>   return getDerived().Traverse##NAME(static_cast<CLASS*>(VAR))
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseStmt(Stmt *S) {
> +bool RecursiveASTVisitor<Derived>::TraverseStmt(Stmt *S) {
>   if (!S)
>     return true;
> 
> @@ -539,7 +543,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseType(QualType T) {
> +bool RecursiveASTVisitor<Derived>::TraverseType(QualType T) {
>   if (T.isNull())
>     return true;
> 
> @@ -555,7 +559,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTypeLoc(TypeLoc TL) {
> +bool RecursiveASTVisitor<Derived>::TraverseTypeLoc(TypeLoc TL) {
>   if (TL.isNull())
>     return true;
> 
> @@ -572,12 +576,12 @@ bool DataRecursiveASTVisitor<Derived>::T
> 
> 
> // Define the Traverse*Attr(Attr* A) methods
> -#define VISITORCLASS DataRecursiveASTVisitor
> +#define VISITORCLASS RecursiveASTVisitor
> #include "clang/AST/AttrVisitor.inc"
> #undef VISITORCLASS
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseDecl(Decl *D) {
> +bool RecursiveASTVisitor<Derived>::TraverseDecl(Decl *D) {
>   if (!D)
>     return true;
> 
> @@ -608,7 +612,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> #undef DISPATCH
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseNestedNameSpecifier(
> +bool RecursiveASTVisitor<Derived>::TraverseNestedNameSpecifier(
>                                                     NestedNameSpecifier *NNS) {
>   if (!NNS)
>     return true;
> @@ -632,7 +636,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseNestedNameSpecifierLoc(
> +bool RecursiveASTVisitor<Derived>::TraverseNestedNameSpecifierLoc(
>                                                   NestedNameSpecifierLoc NNS) {
>   if (!NNS)
>     return true;
> @@ -657,7 +661,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseDeclarationNameInfo(
> +bool RecursiveASTVisitor<Derived>::TraverseDeclarationNameInfo(
>                                                  DeclarationNameInfo NameInfo) {
>   switch (NameInfo.getName().getNameKind()) {
>   case DeclarationName::CXXConstructorName:
> @@ -682,7 +686,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateName(TemplateName Template) {
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateName(TemplateName Template) {
>   if (DependentTemplateName *DTN = Template.getAsDependentTemplateName())
>     TRY_TO(TraverseNestedNameSpecifier(DTN->getQualifier()));
>   else if (QualifiedTemplateName *QTN = Template.getAsQualifiedTemplateName())
> @@ -692,7 +696,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateArgument(
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateArgument(
>                                                 const TemplateArgument &Arg) {
>   switch (Arg.getKind()) {
>   case TemplateArgument::Null:
> @@ -723,7 +727,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> // FIXME: no template name location?
> // FIXME: no source locations for a template argument pack?
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateArgumentLoc(
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateArgumentLoc(
>                                            const TemplateArgumentLoc &ArgLoc) {
>   const TemplateArgument &Arg = ArgLoc.getArgument();
> 
> @@ -762,7 +766,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateArguments(
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateArguments(
>                                                   const TemplateArgument *Args,
>                                                             unsigned NumArgs) {
>   for (unsigned I = 0; I != NumArgs; ++I) {
> @@ -773,7 +777,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseConstructorInitializer(
> +bool RecursiveASTVisitor<Derived>::TraverseConstructorInitializer(
>                                                      CXXCtorInitializer *Init) {
>   if (TypeSourceInfo *TInfo = Init->getTypeSourceInfo())
>     TRY_TO(TraverseTypeLoc(TInfo->getTypeLoc()));
> @@ -784,7 +788,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template <typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseLambdaCapture(LambdaCapture C) {
> +bool RecursiveASTVisitor<Derived>::TraverseLambdaCapture(LambdaCapture C) {
>   return true;
> }
> 
> @@ -793,7 +797,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> // This macro makes available a variable T, the passed-in type.
> #define DEF_TRAVERSE_TYPE(TYPE, CODE)                     \
>   template<typename Derived>                                           \
> -  bool DataRecursiveASTVisitor<Derived>::Traverse##TYPE (TYPE *T) {        \
> +  bool RecursiveASTVisitor<Derived>::Traverse##TYPE (TYPE *T) {        \
>     TRY_TO(WalkUpFrom##TYPE (T));                                      \
>     { CODE; }                                                          \
>     return true;                                                       \
> @@ -975,7 +979,7 @@ DEF_TRAVERSE_TYPE(AtomicType, {
> // continue to work.
> #define DEF_TRAVERSE_TYPELOC(TYPE, CODE)                                \
>   template<typename Derived>                                            \
> -  bool DataRecursiveASTVisitor<Derived>::Traverse##TYPE##Loc(TYPE##Loc TL) { \
> +  bool RecursiveASTVisitor<Derived>::Traverse##TYPE##Loc(TYPE##Loc TL) { \
>     if (getDerived().shouldWalkTypesOfTypeLocs())                       \
>       TRY_TO(WalkUpFrom##TYPE(const_cast<TYPE*>(TL.getTypePtr())));     \
>     TRY_TO(WalkUpFrom##TYPE##Loc(TL));                                  \
> @@ -984,7 +988,7 @@ DEF_TRAVERSE_TYPE(AtomicType, {
>   }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseQualifiedTypeLoc(
> +bool RecursiveASTVisitor<Derived>::TraverseQualifiedTypeLoc(
>     QualifiedTypeLoc TL) {
>   // Move this over to the 'main' typeloc tree.  Note that this is a
>   // move -- we pretend that we were really looking at the unqualified
> @@ -1044,7 +1048,7 @@ DEF_TRAVERSE_TYPELOC(AdjustedType, {
>   })
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseArrayTypeLocHelper(ArrayTypeLoc TL) {
> +bool RecursiveASTVisitor<Derived>::TraverseArrayTypeLocHelper(ArrayTypeLoc TL) {
>   // This isn't available for ArrayType, but is for the ArrayTypeLoc.
>   TRY_TO(TraverseStmt(TL.getSizeExpr()));
>   return true;
> @@ -1212,7 +1216,7 @@ DEF_TRAVERSE_TYPELOC(AtomicType, {
> // than those.
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseDeclContextHelper(DeclContext *DC) {
> +bool RecursiveASTVisitor<Derived>::TraverseDeclContextHelper(DeclContext *DC) {
>   if (!DC)
>     return true;
> 
> @@ -1229,7 +1233,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> // This macro makes available a variable D, the passed-in decl.
> #define DEF_TRAVERSE_DECL(DECL, CODE)                           \
> template<typename Derived>                                      \
> -bool DataRecursiveASTVisitor<Derived>::Traverse##DECL (DECL *D) {   \
> +bool RecursiveASTVisitor<Derived>::Traverse##DECL (DECL *D) {   \
>   TRY_TO(WalkUpFrom##DECL (D));                                 \
>   { CODE; }                                                     \
>   TRY_TO(TraverseDeclContextHelper(dyn_cast<DeclContext>(D)));  \
> @@ -1390,7 +1394,7 @@ DEF_TRAVERSE_DECL(OMPThreadPrivateDecl,
> 
> // A helper method for TemplateDecl's children.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateParameterListHelper(
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateParameterListHelper(
>     TemplateParameterList *TPL) {
>   if (TPL) {
>     for (TemplateParameterList::iterator I = TPL->begin(), E = TPL->end();
> @@ -1404,7 +1408,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> // A helper method for traversing the implicit instantiations of a
> // class template.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseClassInstantiations(
> +bool RecursiveASTVisitor<Derived>::TraverseClassInstantiations(
>     ClassTemplateDecl *D) {
>   for (auto *SD : D->specializations()) {
>     for (auto *RD : SD->redecls()) {
> @@ -1457,7 +1461,7 @@ DEF_TRAVERSE_DECL(ClassTemplateDecl, {
> // A helper method for traversing the implicit instantiations of a
> // class template.
> template <typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseVariableInstantiations(
> +bool RecursiveASTVisitor<Derived>::TraverseVariableInstantiations(
>     VarTemplateDecl *D) {
>   for (auto *SD : D->specializations()) {
>     for (auto *RD : SD->redecls()) {
> @@ -1508,7 +1512,7 @@ DEF_TRAVERSE_DECL(
> // A helper method for traversing the instantiations of a
> // function while skipping its specializations.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseFunctionInstantiations(
> +bool RecursiveASTVisitor<Derived>::TraverseFunctionInstantiations(
>     FunctionTemplateDecl *D) {
>   for (auto *FD : D->specializations()) {
>     for (auto *RD : FD->redecls()) {
> @@ -1609,7 +1613,7 @@ DEF_TRAVERSE_DECL(EnumDecl, {
> 
> // Helper methods for RecordDecl and its children.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseRecordHelper(
> +bool RecursiveASTVisitor<Derived>::TraverseRecordHelper(
>     RecordDecl *D) {
>   // We shouldn't traverse D->getTypeForDecl(); it's a result of
>   // declaring the type, not something that was written in the source.
> @@ -1619,7 +1623,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseCXXRecordHelper(
> +bool RecursiveASTVisitor<Derived>::TraverseCXXRecordHelper(
>     CXXRecordDecl *D) {
>   if (!TraverseRecordHelper(D))
>     return false;
> @@ -1663,7 +1667,7 @@ DEF_TRAVERSE_DECL(ClassTemplateSpecializ
>   })
> 
> template <typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseTemplateArgumentLocsHelper(
> +bool RecursiveASTVisitor<Derived>::TraverseTemplateArgumentLocsHelper(
>     const TemplateArgumentLoc *TAL, unsigned Count) {
>   for (unsigned I = 0; I < Count; ++I) {
>     TRY_TO(TraverseTemplateArgumentLoc(TAL[I]));
> @@ -1706,7 +1710,7 @@ DEF_TRAVERSE_DECL(UnresolvedUsingValueDe
> DEF_TRAVERSE_DECL(IndirectFieldDecl, {})
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseDeclaratorHelper(DeclaratorDecl *D) {
> +bool RecursiveASTVisitor<Derived>::TraverseDeclaratorHelper(DeclaratorDecl *D) {
>   TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc()));
>   if (D->getTypeSourceInfo())
>     TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc()));
> @@ -1742,7 +1746,7 @@ DEF_TRAVERSE_DECL(ObjCIvarDecl, {
>   })
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseFunctionHelper(FunctionDecl *D) {
> +bool RecursiveASTVisitor<Derived>::TraverseFunctionHelper(FunctionDecl *D) {
>   TRY_TO(TraverseNestedNameSpecifierLoc(D->getQualifierLoc()));
>   TRY_TO(TraverseDeclarationNameInfo(D->getNameInfo()));
> 
> @@ -1817,7 +1821,7 @@ DEF_TRAVERSE_DECL(CXXDestructorDecl, {
>   })
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseVarHelper(VarDecl *D) {
> +bool RecursiveASTVisitor<Derived>::TraverseVarHelper(VarDecl *D) {
>   TRY_TO(TraverseDeclaratorHelper(D));
>   // Default params are taken care of when we traverse the ParmVarDecl.
>   if (!isa<ParmVarDecl>(D))
> @@ -1905,7 +1909,7 @@ DEF_TRAVERSE_DECL(ParmVarDecl, {
> // This macro makes available a variable S, the passed-in stmt.
> #define DEF_TRAVERSE_STMT(STMT, CODE)                                   \
> template<typename Derived>                                              \
> -bool DataRecursiveASTVisitor<Derived>::Traverse##STMT (STMT *S) {           \
> +bool RecursiveASTVisitor<Derived>::Traverse##STMT (STMT *S) {           \
>   TRY_TO(WalkUpFrom##STMT(S));                                          \
>   StmtQueueAction StmtQueue(*this);                                     \
>   { CODE; }                                                             \
> @@ -2052,7 +2056,7 @@ DEF_TRAVERSE_STMT(CXXStaticCastExpr, {
> // calls WalkUp*() on the semantic form, before our code can convert
> // to the syntactic form.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseInitListExpr(InitListExpr *S) {
> +bool RecursiveASTVisitor<Derived>::TraverseInitListExpr(InitListExpr *S) {
>   if (InitListExpr *Syn = S->getSyntacticForm())
>     S = Syn;
>   TRY_TO(WalkUpFromInitListExpr(S));
> @@ -2068,7 +2072,7 @@ bool DataRecursiveASTVisitor<Derived>::T
> // are interleaved.  We also need to watch out for null types (default
> // generic associations).
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::
> +bool RecursiveASTVisitor<Derived>::
> TraverseGenericSelectionExpr(GenericSelectionExpr *S) {
>   TRY_TO(WalkUpFromGenericSelectionExpr(S));
>   StmtQueueAction StmtQueue(*this);
> @@ -2084,7 +2088,7 @@ TraverseGenericSelectionExpr(GenericSele
> // PseudoObjectExpr is a special case because of the wierdness with
> // syntactic expressions and opaque values.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::
> +bool RecursiveASTVisitor<Derived>::
> TraversePseudoObjectExpr(PseudoObjectExpr *S) {
>   TRY_TO(WalkUpFromPseudoObjectExpr(S));
>   StmtQueueAction StmtQueue(*this);
> @@ -2164,7 +2168,7 @@ DEF_TRAVERSE_STMT(CXXTemporaryObjectExpr
> 
> // Walk only the visible parts of lambda expressions.  
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseLambdaExpr(LambdaExpr *S) {
> +bool RecursiveASTVisitor<Derived>::TraverseLambdaExpr(LambdaExpr *S) {
>   TRY_TO(WalkUpFromLambdaExpr(S));
> 
>   for (LambdaExpr::capture_iterator C = S->explicit_capture_begin(),
> @@ -2323,7 +2327,7 @@ DEF_TRAVERSE_STMT(AsTypeExpr, { })
> 
> // OpenMP directives.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseOMPExecutableDirective(
> +bool RecursiveASTVisitor<Derived>::TraverseOMPExecutableDirective(
>                                                OMPExecutableDirective *S) {
>   ArrayRef<OMPClause *> Clauses = S->clauses();
>   for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end();
> @@ -2342,7 +2346,7 @@ DEF_TRAVERSE_STMT(OMPSimdDirective, {
> 
> // OpenMP clauses.
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::TraverseOMPClause(OMPClause *C) {
> +bool RecursiveASTVisitor<Derived>::TraverseOMPClause(OMPClause *C) {
>   if (!C) return true;
>   switch (C->getClauseKind()) {
> #define OPENMP_CLAUSE(Name, Class)                                      \
> @@ -2355,72 +2359,72 @@ bool DataRecursiveASTVisitor<Derived>::T
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPIfClause(OMPIfClause *C) {
> +bool RecursiveASTVisitor<Derived>::VisitOMPIfClause(OMPIfClause *C) {
>   TraverseStmt(C->getCondition());
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPNumThreadsClause(
> +bool RecursiveASTVisitor<Derived>::VisitOMPNumThreadsClause(
>                                                     OMPNumThreadsClause *C) {
>   TraverseStmt(C->getNumThreads());
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPSafelenClause(
> +bool RecursiveASTVisitor<Derived>::VisitOMPSafelenClause(
>                                             OMPSafelenClause *C) {
>   TraverseStmt(C->getSafelen());
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPDefaultClause(OMPDefaultClause *C) {
> +bool RecursiveASTVisitor<Derived>::VisitOMPDefaultClause(OMPDefaultClause *C) {
>   return true;
> }
> 
> template<typename Derived>
> bool
> -DataRecursiveASTVisitor<Derived>::VisitOMPProcBindClause(OMPProcBindClause *C) {
> +RecursiveASTVisitor<Derived>::VisitOMPProcBindClause(OMPProcBindClause *C) {
>   return true;
> }
> 
> template<typename Derived>
> template<typename T>
> -void DataRecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
> +void RecursiveASTVisitor<Derived>::VisitOMPClauseList(T *Node) {
>   for (auto *I : Node->varlists())
>     TraverseStmt(I);
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPPrivateClause(OMPPrivateClause *C) {
> +bool RecursiveASTVisitor<Derived>::VisitOMPPrivateClause(OMPPrivateClause *C) {
>   VisitOMPClauseList(C);
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPFirstprivateClause(
> +bool RecursiveASTVisitor<Derived>::VisitOMPFirstprivateClause(
>                                                     OMPFirstprivateClause *C) {
>   VisitOMPClauseList(C);
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPSharedClause(OMPSharedClause *C) {
> +bool RecursiveASTVisitor<Derived>::VisitOMPSharedClause(OMPSharedClause *C) {
>   VisitOMPClauseList(C);
>   return true;
> }
> 
> template<typename Derived>
> bool
> -DataRecursiveASTVisitor<Derived>::VisitOMPLinearClause(OMPLinearClause *C) {
> +RecursiveASTVisitor<Derived>::VisitOMPLinearClause(OMPLinearClause *C) {
>   VisitOMPClauseList(C);
>   TraverseStmt(C->getStep());
>   return true;
> }
> 
> template<typename Derived>
> -bool DataRecursiveASTVisitor<Derived>::VisitOMPCopyinClause(OMPCopyinClause *C) {
> +bool RecursiveASTVisitor<Derived>::VisitOMPCopyinClause(OMPCopyinClause *C) {
>   VisitOMPClauseList(C);
>   return true;
> }
> @@ -2446,6 +2450,8 @@ bool DataRecursiveASTVisitor<Derived>::V
> 
> #undef TRY_TO
> 
> +#undef RecursiveASTVisitor
> +
> } // end namespace clang
> 
> #endif // LLVM_CLANG_LIBCLANG_RECURSIVEASTVISITOR_H
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list