Skip to content
Snippets Groups Projects
Commit e4bdb935 authored by John McCall's avatar John McCall
Browse files

Publicize getSigilLoc / setSigilLoc for better metaprogramming.

Fix the ReferenceTypeLoc hierarchy.

llvm-svn: 84714
parent 7099d0c1
No related branches found
No related tags found
No related merge requests found
...@@ -467,7 +467,7 @@ struct PointerLikeLocInfo { ...@@ -467,7 +467,7 @@ struct PointerLikeLocInfo {
template <class Derived, class TypeClass, class LocalData = PointerLikeLocInfo> template <class Derived, class TypeClass, class LocalData = PointerLikeLocInfo>
class PointerLikeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, Derived, class PointerLikeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, Derived,
TypeClass, LocalData> { TypeClass, LocalData> {
protected: public:
SourceLocation getSigilLoc() const { SourceLocation getSigilLoc() const {
return this->getLocalData()->StarLoc; return this->getLocalData()->StarLoc;
} }
...@@ -475,7 +475,6 @@ protected: ...@@ -475,7 +475,6 @@ protected:
this->getLocalData()->StarLoc = Loc; this->getLocalData()->StarLoc = Loc;
} }
public:
TypeLoc getPointeeLoc() const { TypeLoc getPointeeLoc() const {
return this->getInnerTypeLoc(); return this->getInnerTypeLoc();
} }
...@@ -537,8 +536,10 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc, ...@@ -537,8 +536,10 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
ReferenceType> { ReferenceType> {
}; };
class LValueReferenceTypeLoc : public PointerLikeTypeLoc<LValueReferenceTypeLoc, class LValueReferenceTypeLoc :
LValueReferenceType> { public InheritingConcreteTypeLoc<ReferenceTypeLoc,
LValueReferenceTypeLoc,
LValueReferenceType> {
public: public:
SourceLocation getAmpLoc() const { SourceLocation getAmpLoc() const {
return getSigilLoc(); return getSigilLoc();
...@@ -548,8 +549,10 @@ public: ...@@ -548,8 +549,10 @@ public:
} }
}; };
class RValueReferenceTypeLoc : public PointerLikeTypeLoc<RValueReferenceTypeLoc, class RValueReferenceTypeLoc :
RValueReferenceType> { public InheritingConcreteTypeLoc<ReferenceTypeLoc,
RValueReferenceTypeLoc,
RValueReferenceType> {
public: public:
SourceLocation getAmpAmpLoc() const { SourceLocation getAmpAmpLoc() const {
return getSigilLoc(); return getSigilLoc();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment