Add getSourceRange() methods for ObjC Decls.
llvm-svn: 76267
This commit is contained in:
parent
f56501ce48
commit
ce55b2e543
|
@ -178,7 +178,7 @@ public:
|
||||||
SourceLocation getLocStart() const { return getLocation(); }
|
SourceLocation getLocStart() const { return getLocation(); }
|
||||||
SourceLocation getLocEnd() const { return EndLoc; }
|
SourceLocation getLocEnd() const { return EndLoc; }
|
||||||
void setEndLoc(SourceLocation Loc) { EndLoc = Loc; }
|
void setEndLoc(SourceLocation Loc) { EndLoc = Loc; }
|
||||||
SourceRange getSourceRange() const {
|
virtual SourceRange getSourceRange() const {
|
||||||
return SourceRange(getLocation(), EndLoc);
|
return SourceRange(getLocation(), EndLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,6 +342,10 @@ public:
|
||||||
SourceLocation getAtEndLoc() const { return AtEndLoc; }
|
SourceLocation getAtEndLoc() const { return AtEndLoc; }
|
||||||
void setAtEndLoc(SourceLocation L) { AtEndLoc = L; }
|
void setAtEndLoc(SourceLocation L) { AtEndLoc = L; }
|
||||||
|
|
||||||
|
virtual SourceRange getSourceRange() const {
|
||||||
|
return SourceRange(getLocation(), getAtEndLoc());
|
||||||
|
}
|
||||||
|
|
||||||
// Implement isa/cast/dyncast/etc.
|
// Implement isa/cast/dyncast/etc.
|
||||||
static bool classof(const Decl *D) {
|
static bool classof(const Decl *D) {
|
||||||
return D->getKind() >= ObjCContainerFirst &&
|
return D->getKind() >= ObjCContainerFirst &&
|
||||||
|
@ -880,6 +884,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Location information, modeled after the Stmt API.
|
// Location information, modeled after the Stmt API.
|
||||||
|
virtual SourceRange getSourceRange() const {
|
||||||
|
return SourceRange(getLocation(), EndLoc);
|
||||||
|
}
|
||||||
SourceLocation getLocStart() const { return getLocation(); }
|
SourceLocation getLocStart() const { return getLocation(); }
|
||||||
SourceLocation getLocEnd() const { return EndLoc; }
|
SourceLocation getLocEnd() const { return EndLoc; }
|
||||||
void setLocEnd(SourceLocation LE) { EndLoc = LE; };
|
void setLocEnd(SourceLocation LE) { EndLoc = LE; };
|
||||||
|
@ -1188,6 +1195,9 @@ public:
|
||||||
Kind PK,
|
Kind PK,
|
||||||
ObjCIvarDecl *ivarDecl);
|
ObjCIvarDecl *ivarDecl);
|
||||||
|
|
||||||
|
virtual SourceRange getSourceRange() const {
|
||||||
|
return SourceRange(AtLoc, getLocation());
|
||||||
|
}
|
||||||
SourceLocation getLocStart() const { return AtLoc; }
|
SourceLocation getLocStart() const { return AtLoc; }
|
||||||
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
|
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue