forked from OSchip/llvm-project
Publicize getSigilLoc / setSigilLoc for better metaprogramming.
Fix the ReferenceTypeLoc hierarchy. llvm-svn: 84714
This commit is contained in:
parent
7099d0c19c
commit
e4bdb93570
|
@ -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:
|
||||||
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,
|
||||||
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:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
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();
|
||||||
|
|
Loading…
Reference in New Issue