From: Douglas Gregor Date: Wed, 15 Dec 2010 22:07:31 +0000 (+0000) Subject: Teach the RecursiveASTVisitor to traverse the type-location X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c11e1d7f1eff113b8a4b2a6370975eb1dc7c9205;p=clang Teach the RecursiveASTVisitor to traverse the type-location information for all of the explicit casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121900 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index 962da15e24..2fd540a0be 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -1655,27 +1655,27 @@ DEF_TRAVERSE_STMT(ImplicitCastExpr, { }) DEF_TRAVERSE_STMT(CStyleCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) DEF_TRAVERSE_STMT(CXXFunctionalCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) DEF_TRAVERSE_STMT(CXXConstCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) DEF_TRAVERSE_STMT(CXXDynamicCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) DEF_TRAVERSE_STMT(CXXReinterpretCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) DEF_TRAVERSE_STMT(CXXStaticCastExpr, { - TRY_TO(TraverseType(S->getTypeAsWritten())); + TRY_TO(TraverseTypeLoc(S->getTypeInfoAsWritten()->getTypeLoc())); }) // InitListExpr is a tricky one, because we want to do all our work on