From 5b3552f7879b2eec0cd69d282b6f2b04b73b20e1 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Thu, 26 Jun 2014 01:42:30 +0000 Subject: Reformat RAVs to sync up following recent updates git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211759 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DataRecursiveASTVisitor.h | 3 +- include/clang/AST/RecursiveASTVisitor.h | 80 ++++++++++++++--------------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/include/clang/AST/DataRecursiveASTVisitor.h b/include/clang/AST/DataRecursiveASTVisitor.h index 23c9ce554f..9a27c3954a 100644 --- a/include/clang/AST/DataRecursiveASTVisitor.h +++ b/include/clang/AST/DataRecursiveASTVisitor.h @@ -2361,8 +2361,7 @@ RecursiveASTVisitor::VisitOMPScheduleClause(OMPScheduleClause *C) { } template -bool -RecursiveASTVisitor::VisitOMPOrderedClause(OMPOrderedClause *) { +bool RecursiveASTVisitor::VisitOMPOrderedClause(OMPOrderedClause *) { return true; } diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index 2877642be5..9e9d4effd9 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -1525,22 +1525,22 @@ bool RecursiveASTVisitor::TraverseTemplateInstantiations( // template declarations. #define DEF_TRAVERSE_TMPL_DECL(TMPLDECLKIND) \ DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplateDecl, { \ - TRY_TO(TraverseDecl(D->getTemplatedDecl())); \ - TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ - \ - /* By default, we do not traverse the instantiations of - class templates since they do not appear in the user code. The - following code optionally traverses them. - - We only traverse the class instantiations when we see the canonical - declaration of the template, to ensure we only visit them once. */ \ - if (getDerived().shouldVisitTemplateInstantiations() && \ - D == D->getCanonicalDecl()) \ - TRY_TO(TraverseTemplateInstantiations(D)); \ - \ - /* Note that getInstantiatedFromMemberTemplate() is just a link - from a template instantiation back to the template from which - it was instantiated, and thus should not be traversed. */ \ + TRY_TO(TraverseDecl(D->getTemplatedDecl())); \ + TRY_TO(TraverseTemplateParameterListHelper(D->getTemplateParameters())); \ + \ + /* By default, we do not traverse the instantiations of \ + class templates since they do not appear in the user code. The \ + following code optionally traverses them. \ + \ + We only traverse the class instantiations when we see the canonical \ + declaration of the template, to ensure we only visit them once. */ \ + if (getDerived().shouldVisitTemplateInstantiations() && \ + D == D->getCanonicalDecl()) \ + TRY_TO(TraverseTemplateInstantiations(D)); \ + \ + /* Note that getInstantiatedFromMemberTemplate() is just a link \ + from a template instantiation back to the template from which \ + it was instantiated, and thus should not be traversed. */ \ }) DEF_TRAVERSE_TMPL_DECL(Class) @@ -1666,24 +1666,24 @@ bool RecursiveASTVisitor::TraverseTemplateArgumentLocsHelper( #define DEF_TRAVERSE_TMPL_PART_SPEC_DECL(TMPLDECLKIND, DECLKIND) \ DEF_TRAVERSE_DECL(TMPLDECLKIND##TemplatePartialSpecializationDecl, { \ - /* The partial specialization. */ \ - if (TemplateParameterList *TPL = D->getTemplateParameters()) { \ - for (TemplateParameterList::iterator I = TPL->begin(), E = TPL->end(); \ - I != E; ++I) { \ - TRY_TO(TraverseDecl(*I)); \ - } \ - } \ - /* The args that remains unspecialized. */ \ - TRY_TO(TraverseTemplateArgumentLocsHelper( \ - D->getTemplateArgsAsWritten()->getTemplateArgs(), \ - D->getTemplateArgsAsWritten()->NumTemplateArgs)); \ - \ - /* Don't need the *TemplatePartialSpecializationHelper, even - though that's our parent class -- we already visit all the - template args here. */ \ - TRY_TO(Traverse##DECLKIND##Helper(D)); \ - \ - /* Instantiations will have been visited with the primary template. */ \ + /* The partial specialization. */ \ + if (TemplateParameterList *TPL = D->getTemplateParameters()) { \ + for (TemplateParameterList::iterator I = TPL->begin(), E = TPL->end(); \ + I != E; ++I) { \ + TRY_TO(TraverseDecl(*I)); \ + } \ + } \ + /* The args that remains unspecialized. */ \ + TRY_TO(TraverseTemplateArgumentLocsHelper( \ + D->getTemplateArgsAsWritten()->getTemplateArgs(), \ + D->getTemplateArgsAsWritten()->NumTemplateArgs)); \ + \ + /* Don't need the *TemplatePartialSpecializationHelper, even \ + though that's our parent class -- we already visit all the \ + template args here. */ \ + TRY_TO(Traverse##DECLKIND##Helper(D)); \ + \ + /* Instantiations will have been visited with the primary template. */ \ }) DEF_TRAVERSE_TMPL_PART_SPEC_DECL(Class, CXXRecord) @@ -2351,19 +2351,20 @@ RecursiveASTVisitor::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) { return true; } -template +template bool RecursiveASTVisitor::VisitOMPSafelenClause(OMPSafelenClause *C) { TraverseStmt(C->getSafelen()); return true; } template -bool RecursiveASTVisitor::VisitOMPCollapseClause(OMPCollapseClause *C) { +bool +RecursiveASTVisitor::VisitOMPCollapseClause(OMPCollapseClause *C) { TraverseStmt(C->getNumForLoops()); return true; } -template +template bool RecursiveASTVisitor::VisitOMPDefaultClause(OMPDefaultClause *C) { return true; } @@ -2382,8 +2383,7 @@ RecursiveASTVisitor::VisitOMPScheduleClause(OMPScheduleClause *C) { } template -bool -RecursiveASTVisitor::VisitOMPOrderedClause(OMPOrderedClause *) { +bool RecursiveASTVisitor::VisitOMPOrderedClause(OMPOrderedClause *) { return true; } @@ -2425,7 +2425,7 @@ bool RecursiveASTVisitor::VisitOMPSharedClause(OMPSharedClause *C) { return true; } -template +template bool RecursiveASTVisitor::VisitOMPLinearClause(OMPLinearClause *C) { VisitOMPClauseList(C); TraverseStmt(C->getStep()); -- cgit v1.2.3