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>
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue