Avoid double-traversing for QualifiedTypeLoc -- we were calling

VisitTypeLoc twice for qualified types, once for the qualified form
and once for the unqualified (though they looked the same by the time
we got to visittypeloc).  Now only visit once, which matches previous
behavior.

Reviewed by nlewycky

llvm-svn: 107754
This commit is contained in:
Craig Silverstein 2010-07-07 04:38:11 +00:00
parent 6f80bc5602
commit 6f9236e762
1 changed files with 6 additions and 3 deletions

View File

@ -748,9 +748,12 @@ DEF_TRAVERSE_TYPE(ObjCObjectPointerType, {
return true; \
}
DEF_TRAVERSE_TYPELOC(QualifiedTypeLoc, {
TRY_TO(TraverseTypeLoc(TL.getUnqualifiedLoc()));
})
template<typename Derived> \
bool RecursiveASTVisitor<Derived>::TraverseQualifiedTypeLoc(
QualifiedTypeLoc TL) {
// Move this over to the 'main' typeloc tree.
return TraverseTypeLoc(TL.getUnqualifiedLoc());
}
DEF_TRAVERSE_TYPELOC(BuiltinTypeLoc, { })