From: Craig Silverstein Date: Fri, 15 Oct 2010 06:51:01 +0000 (+0000) Subject: Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84a8e0a846d658d784090c4f378cc1c6c6b0ef3f;p=clang Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the typloc information is available (I don't think it was, originally). Submitted as a 'trivial' change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116568 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index cb617f14e0..101a850f61 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -1251,7 +1251,7 @@ DEF_TRAVERSE_DECL(TemplateTypeParmDecl, { }) DEF_TRAVERSE_DECL(TypedefDecl, { - TRY_TO(TraverseType(D->getUnderlyingType())); + TRY_TO(TraverseTypeLoc(D->getTypeSourceInfo()->getTypeLoc())); // We shouldn't traverse D->getTypeForDecl(); it's a result of // declaring the typedef, not something that was written in the // source.