From: Craig Silverstein Date: Wed, 29 Sep 2010 04:14:20 +0000 (+0000) Subject: Visit the type information for CXXUnresolvedConstructExpr, just like X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac45ad57f0641b0d556ca27d19a59930925d6add;p=clang Visit the type information for CXXUnresolvedConstructExpr, just like we do for the similar CXXTemporaryObjectExpr. OKed by chandlerc and wan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115025 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index d971fb7c36..83a3d145e2 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -1785,6 +1785,27 @@ DEF_TRAVERSE_STMT(UnaryTypeTraitExpr, { TRY_TO(TraverseTypeLoc(S->getQueriedTypeSourceInfo()->getTypeLoc())); }) +DEF_TRAVERSE_STMT(VAArgExpr, { + // The child-iterator will pick up the expression argument. + TRY_TO(TraverseTypeLoc(S->getWrittenTypeInfo()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(CXXTemporaryObjectExpr, { + // This is called for code like 'return T()' where T is a class type. + TRY_TO(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc())); + }) + +DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, { + // This is called for code like 'T()', where T is a template argument. + TRY_TO(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc())); + }) + +// These expressions all might take explicit template arguments. +// We traverse those if so. FIXME: implement these. +DEF_TRAVERSE_STMT(CXXConstructExpr, { }) +DEF_TRAVERSE_STMT(CallExpr, { }) +DEF_TRAVERSE_STMT(CXXMemberCallExpr, { }) + // These exprs (most of them), do not need any action except iterating // over the children. DEF_TRAVERSE_STMT(AddrLabelExpr, { }) @@ -1802,7 +1823,6 @@ DEF_TRAVERSE_STMT(CXXNullPtrLiteralExpr, { }) DEF_TRAVERSE_STMT(CXXPseudoDestructorExpr, { }) DEF_TRAVERSE_STMT(CXXThisExpr, { }) DEF_TRAVERSE_STMT(CXXThrowExpr, { }) -DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, { }) DEF_TRAVERSE_STMT(DesignatedInitExpr, { }) DEF_TRAVERSE_STMT(ExtVectorElementExpr, { }) DEF_TRAVERSE_STMT(GNUNullExpr, { }) @@ -1823,19 +1843,6 @@ DEF_TRAVERSE_STMT(ShuffleVectorExpr, { }) DEF_TRAVERSE_STMT(StmtExpr, { }) DEF_TRAVERSE_STMT(UnresolvedLookupExpr, { }) DEF_TRAVERSE_STMT(UnresolvedMemberExpr, { }) -DEF_TRAVERSE_STMT(VAArgExpr, { - // The child-iterator will pick up the expression argument. - TRY_TO(TraverseTypeLoc(S->getWrittenTypeInfo()->getTypeLoc())); - }) -DEF_TRAVERSE_STMT(CXXConstructExpr, { }) - -DEF_TRAVERSE_STMT(CXXTemporaryObjectExpr, { - // This is called for code like 'return T()' where T is a class type. - TRY_TO(TraverseType(S->getType())); - }) - -DEF_TRAVERSE_STMT(CallExpr, { }) -DEF_TRAVERSE_STMT(CXXMemberCallExpr, { }) DEF_TRAVERSE_STMT(CXXOperatorCallExpr, { }) // These operators (all of them) do not need any action except @@ -1869,7 +1876,6 @@ DEF_TRAVERSE_STMT(ObjCStringLiteral, { }) // http://clang.llvm.org/doxygen/classclang_1_1CXXTypeidExpr.html // http://clang.llvm.org/doxygen/classclang_1_1SizeOfAlignOfExpr.html // http://clang.llvm.org/doxygen/classclang_1_1TypesCompatibleExpr.html -// http://clang.llvm.org/doxygen/classclang_1_1CXXUnresolvedConstructExpr.html // Every class that has getQualifier. #undef DEF_TRAVERSE_STMT