diff options
Diffstat (limited to 'include/clang/AST/Stmt.h')
-rw-r--r-- | include/clang/AST/Stmt.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 3862cf3fba..ca42b3ea7e 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -1005,10 +1005,17 @@ public: void setStarLoc(SourceLocation L) { StarLoc = L; } SourceLocation getStarLoc() const { return StarLoc; } - Expr *getTarget(); - const Expr *getTarget() const; + Expr *getTarget() { return reinterpret_cast<Expr*>(Target); } + const Expr *getTarget() const {return reinterpret_cast<const Expr*>(Target);} void setTarget(Expr *E) { Target = reinterpret_cast<Stmt*>(E); } + /// getConstantTarget - Returns the fixed target of this indirect + /// goto, if one exists. + LabelStmt *getConstantTarget(); + const LabelStmt *getConstantTarget() const { + return const_cast<IndirectGotoStmt*>(this)->getConstantTarget(); + } + virtual SourceRange getSourceRange() const { return SourceRange(GotoLoc, Target->getLocEnd()); } |