SourceLocation getLocStart() const { return getLocation(); }
SourceLocation getLocEnd() const { return EndLoc; }
void setEndLoc(SourceLocation Loc) { EndLoc = Loc; }
- SourceRange getSourceRange() const {
+ virtual SourceRange getSourceRange() const {
return SourceRange(getLocation(), EndLoc);
}
// Marks the end of the container.
SourceLocation getAtEndLoc() const { return AtEndLoc; }
void setAtEndLoc(SourceLocation L) { AtEndLoc = L; }
+
+ virtual SourceRange getSourceRange() const {
+ return SourceRange(getLocation(), getAtEndLoc());
+ }
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) {
ObjCMethodDecl *lookupClassMethod(Selector Sel);
ObjCInterfaceDecl *lookupInheritedClass(const IdentifierInfo *ICName);
- // Location information, modeled after the Stmt API.
+ // Location information, modeled after the Stmt API.
SourceLocation getLocStart() const { return getLocation(); } // '@'interface
SourceLocation getLocEnd() const { return EndLoc; }
void setLocEnd(SourceLocation LE) { EndLoc = LE; };
}
// Location information, modeled after the Stmt API.
+ virtual SourceRange getSourceRange() const {
+ return SourceRange(getLocation(), EndLoc);
+ }
SourceLocation getLocStart() const { return getLocation(); }
SourceLocation getLocEnd() const { return EndLoc; }
void setLocEnd(SourceLocation LE) { EndLoc = LE; };
Kind PK,
ObjCIvarDecl *ivarDecl);
+ virtual SourceRange getSourceRange() const {
+ return SourceRange(AtLoc, getLocation());
+ }
SourceLocation getLocStart() const { return AtLoc; }
void setAtLoc(SourceLocation Loc) { AtLoc = Loc; }