diff options
author | John McCall <rjmccall@apple.com> | 2009-10-18 01:05:36 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-10-18 01:05:36 +0000 |
commit | 51bd803fbdade51d674598ed45da3d54190a656c (patch) | |
tree | 6a0f7a2881033be64625cb432e7b7e96eb0729fa /lib/Index/ResolveLocation.cpp | |
parent | a47dd191719e88e41ce82555685869d2054178e1 (diff) |
Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.
Handle all cases in PCH. Handle a few more cases when inserting
location information in SemaType.
It should be extremely straightforward to add new location information
to existing TypeLoc objects now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/ResolveLocation.cpp')
-rw-r--r-- | lib/Index/ResolveLocation.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Index/ResolveLocation.cpp b/lib/Index/ResolveLocation.cpp index 229669dc33..b94d48e33d 100644 --- a/lib/Index/ResolveLocation.cpp +++ b/lib/Index/ResolveLocation.cpp @@ -120,11 +120,11 @@ public: TypeLocResolver(ASTContext &ctx, SourceLocation loc, Decl *pd) : LocResolverBase(ctx, loc), ParentDecl(pd) { } - ASTLocation VisitTypedefLoc(TypedefLoc TL); - ASTLocation VisitFunctionLoc(FunctionLoc TL); - ASTLocation VisitArrayLoc(ArrayLoc TL); - ASTLocation VisitObjCInterfaceLoc(ObjCInterfaceLoc TL); - ASTLocation VisitObjCProtocolListLoc(ObjCProtocolListLoc TL); + ASTLocation VisitTypedefTypeLoc(TypedefTypeLoc TL); + ASTLocation VisitFunctionTypeLoc(FunctionTypeLoc TL); + ASTLocation VisitArrayTypeLoc(ArrayTypeLoc TL); + ASTLocation VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL); + ASTLocation VisitObjCProtocolListTypeLoc(ObjCProtocolListTypeLoc TL); ASTLocation VisitTypeLoc(TypeLoc TL); }; @@ -349,7 +349,7 @@ ASTLocation DeclLocResolver::VisitDecl(Decl *D) { return ASTLocation(D); } -ASTLocation TypeLocResolver::VisitTypedefLoc(TypedefLoc TL) { +ASTLocation TypeLocResolver::VisitTypedefTypeLoc(TypedefTypeLoc TL) { assert(ContainsLocation(TL) && "Should visit only after verifying that loc is in range"); if (ContainsLocation(TL.getNameLoc())) @@ -357,7 +357,7 @@ ASTLocation TypeLocResolver::VisitTypedefLoc(TypedefLoc TL) { return ASTLocation(ParentDecl, TL); } -ASTLocation TypeLocResolver::VisitFunctionLoc(FunctionLoc TL) { +ASTLocation TypeLocResolver::VisitFunctionTypeLoc(FunctionTypeLoc TL) { assert(ContainsLocation(TL) && "Should visit only after verifying that loc is in range"); @@ -373,7 +373,7 @@ ASTLocation TypeLocResolver::VisitFunctionLoc(FunctionLoc TL) { return ASTLocation(ParentDecl, TL); } -ASTLocation TypeLocResolver::VisitArrayLoc(ArrayLoc TL) { +ASTLocation TypeLocResolver::VisitArrayTypeLoc(ArrayTypeLoc TL) { assert(ContainsLocation(TL) && "Should visit only after verifying that loc is in range"); @@ -384,7 +384,7 @@ ASTLocation TypeLocResolver::VisitArrayLoc(ArrayLoc TL) { return ASTLocation(ParentDecl, TL); } -ASTLocation TypeLocResolver::VisitObjCInterfaceLoc(ObjCInterfaceLoc TL) { +ASTLocation TypeLocResolver::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) { assert(ContainsLocation(TL) && "Should visit only after verifying that loc is in range"); if (ContainsLocation(TL.getNameLoc())) @@ -392,7 +392,7 @@ ASTLocation TypeLocResolver::VisitObjCInterfaceLoc(ObjCInterfaceLoc TL) { return ASTLocation(ParentDecl, TL); } -ASTLocation TypeLocResolver::VisitObjCProtocolListLoc(ObjCProtocolListLoc TL) { +ASTLocation TypeLocResolver::VisitObjCProtocolListTypeLoc(ObjCProtocolListTypeLoc TL) { assert(ContainsLocation(TL) && "Should visit only after verifying that loc is in range"); |