diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-01 18:12:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-01 18:12:44 +0000 |
commit | 9e876876afc13aa671cc11a17c19907c599b9ab9 (patch) | |
tree | 68df752f2a2f51b95147c6a1abcb047a4cb7e956 /tools/libclang/CIndex.cpp | |
parent | 451f8caf37fb6691936f9003833e857e1d1dc987 (diff) |
Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,
enum clang::NestedNameSpecifier::SpecifierKind
Fixes in this iteration include:
(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression
dep->template f<T>::f()
This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...
(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 72d930ef9e..8c2111d4ad 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -343,6 +343,7 @@ public: bool VisitPackExpansionTypeLoc(PackExpansionTypeLoc TL); bool VisitTypeOfTypeLoc(TypeOfTypeLoc TL); bool VisitDependentNameTypeLoc(DependentNameTypeLoc TL); + bool VisitElaboratedTypeLoc(ElaboratedTypeLoc TL); // Data-recursive visitor functions. bool IsInRegionOfInterest(CXCursor C); @@ -1511,6 +1512,13 @@ bool CursorVisitor::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) { return false; } +bool CursorVisitor::VisitElaboratedTypeLoc(ElaboratedTypeLoc TL) { + if (VisitNestedNameSpecifierLoc(TL.getQualifierLoc())) + return true; + + return Visit(TL.getNamedTypeLoc()); +} + bool CursorVisitor::VisitPackExpansionTypeLoc(PackExpansionTypeLoc TL) { return Visit(TL.getPatternLoc()); } |