1) Fix a typo in PPCallbacks: It's elif, not elfif. :-) This is

contentful, since the typo was in the method-name...

2) Clarify some comments in RecursiveASTVisitor.

llvm-svn: 118448
This commit is contained in:
Craig Silverstein 2010-11-08 21:43:51 +00:00
parent 9c656fe815
commit 174241e9a0
2 changed files with 6 additions and 5 deletions

View File

@ -995,17 +995,18 @@ DEF_TRAVERSE_DECL(FileScopeAsmDecl, {
})
DEF_TRAVERSE_DECL(FriendDecl, {
// At most one of these two will be non-NULL.
TRY_TO(TraverseDecl(D->getFriendDecl()));
// Friend is either decl or a type.
if (D->getFriendType())
TRY_TO(TraverseTypeLoc(D->getFriendType()->getTypeLoc()));
else
TRY_TO(TraverseDecl(D->getFriendDecl()));
})
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()));
else
TRY_TO(TraverseDecl(D->getFriendDecl()));
for (unsigned I = 0, E = D->getNumTemplateParameters(); I < E; ++I) {
TemplateParameterList *TPL = D->getTemplateParameterList(I);
for (TemplateParameterList::iterator ITPL = TPL->begin(),

View File

@ -228,7 +228,7 @@ public:
}
/// Elif -- This hook is called whenever an #if is seen.
virtual void ElfIf(SourceRange Range) {
virtual void Elif(SourceRange Range) {
First->Elif(Range);
Second->Elif(Range);
}