Publicize getSigilLoc / setSigilLoc for better metaprogramming.

Fix the ReferenceTypeLoc hierarchy.

llvm-svn: 84714
This commit is contained in:
John McCall 2009-10-21 00:21:09 +00:00
parent 7099d0c19c
commit e4bdb93570
1 changed files with 9 additions and 6 deletions

View File

@ -467,7 +467,7 @@ struct PointerLikeLocInfo {
template <class Derived, class TypeClass, class LocalData = PointerLikeLocInfo>
class PointerLikeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, Derived,
TypeClass, LocalData> {
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,7 +536,9 @@ class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
ReferenceType> {
};
class LValueReferenceTypeLoc : public PointerLikeTypeLoc<LValueReferenceTypeLoc,
class LValueReferenceTypeLoc :
public InheritingConcreteTypeLoc<ReferenceTypeLoc,
LValueReferenceTypeLoc,
LValueReferenceType> {
public:
SourceLocation getAmpLoc() const {
@ -548,7 +549,9 @@ public:
}
};
class RValueReferenceTypeLoc : public PointerLikeTypeLoc<RValueReferenceTypeLoc,
class RValueReferenceTypeLoc :
public InheritingConcreteTypeLoc<ReferenceTypeLoc,
RValueReferenceTypeLoc,
RValueReferenceType> {
public:
SourceLocation getAmpAmpLoc() const {