[cfe-commits] r118323 - /cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
Craig Silverstein
csilvers2000 at yahoo.com
Fri Nov 5 23:25:02 PDT 2010
Author: csilvers
Date: Sat Nov 6 01:25:02 2010
New Revision: 118323
URL: http://llvm.org/viewvc/llvm-project?rev=118323&view=rev
Log:
Fix a bug where we were recursing on friend decls for friend
functions, but not for friend types.
Reviewed by wan
Modified:
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=118323&r1=118322&r2=118323&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Sat Nov 6 01:25:02 2010
@@ -995,11 +995,17 @@
})
DEF_TRAVERSE_DECL(FriendDecl, {
+ // At most one of these two will be non-NULL.
TRY_TO(TraverseDecl(D->getFriendDecl()));
+ if (D->getFriendType())
+ TRY_TO(TraverseTypeLoc(D->getFriendType()->getTypeLoc()));
})
DEF_TRAVERSE_DECL(FriendTemplateDecl, {
+ // At most one of these two will be non-NULL.
TRY_TO(TraverseDecl(D->getFriendDecl()));
+ if (D->getFriendType())
+ TRY_TO(TraverseTypeLoc(D->getFriendType()->getTypeLoc()));
for (unsigned I = 0, E = D->getNumTemplateParameters(); I < E; ++I) {
TemplateParameterList *TPL = D->getTemplateParameterList(I);
for (TemplateParameterList::iterator ITPL = TPL->begin(),
More information about the cfe-commits
mailing list