aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers2000@yahoo.com>2010-07-07 04:38:11 +0000
committerCraig Silverstein <csilvers2000@yahoo.com>2010-07-07 04:38:11 +0000
commitc34c2116346a29869b47b190f6dea589823d6947 (patch)
tree79aef31227cb6cb50a12b061723d9916a73c503d
parent7dbf818789a1b0b8dc4f520e9d3c84fb27605b7b (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107754 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/RecursiveASTVisitor.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h
index e87cfbb8b0..6110aab339 100644
--- a/include/clang/AST/RecursiveASTVisitor.h
+++ b/include/clang/AST/RecursiveASTVisitor.h
@@ -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, { })