[cfe-commits] r118448 - in /cfe/trunk/include/clang: AST/RecursiveASTVisitor.h Lex/PPCallbacks.h
Craig Silverstein
csilvers2000 at yahoo.com
Mon Nov 8 13:43:51 PST 2010
Author: csilvers
Date: Mon Nov 8 15:43:51 2010
New Revision: 118448
URL: http://llvm.org/viewvc/llvm-project?rev=118448&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
cfe/trunk/include/clang/Lex/PPCallbacks.h
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=118448&r1=118447&r2=118448&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Mon Nov 8 15:43:51 2010
@@ -995,17 +995,18 @@
})
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(),
Modified: cfe/trunk/include/clang/Lex/PPCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PPCallbacks.h?rev=118448&r1=118447&r2=118448&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PPCallbacks.h (original)
+++ cfe/trunk/include/clang/Lex/PPCallbacks.h Mon Nov 8 15:43:51 2010
@@ -228,7 +228,7 @@
}
/// 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);
}
More information about the cfe-commits
mailing list