diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h index 05eed0a18707109d06dcb8e1dd1f5356a5aa256e..b980f2bd0ff8e586cd1664c8f0d5ee0beebcc2df 100644 --- a/clang/include/clang/AST/TypeLoc.h +++ b/clang/include/clang/AST/TypeLoc.h @@ -467,7 +467,7 @@ struct PointerLikeLocInfo { template class PointerLikeTypeLoc : public ConcreteTypeLoc { -protected: +public: SourceLocation getSigilLoc() const { return this->getLocalData()->StarLoc; } @@ -475,7 +475,6 @@ protected: this->getLocalData()->StarLoc = Loc; } -public: TypeLoc getPointeeLoc() const { return this->getInnerTypeLoc(); } @@ -537,8 +536,10 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc { }; -class LValueReferenceTypeLoc : public PointerLikeTypeLoc { +class LValueReferenceTypeLoc : + public InheritingConcreteTypeLoc { public: SourceLocation getAmpLoc() const { return getSigilLoc(); @@ -548,8 +549,10 @@ public: } }; -class RValueReferenceTypeLoc : public PointerLikeTypeLoc { +class RValueReferenceTypeLoc : + public InheritingConcreteTypeLoc { public: SourceLocation getAmpAmpLoc() const { return getSigilLoc();