diff options
-rw-r--r-- | include/clang/AST/CFG.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clang/AST/CFG.h b/include/clang/AST/CFG.h index 054358875c..8fc65ef436 100644 --- a/include/clang/AST/CFG.h +++ b/include/clang/AST/CFG.h @@ -103,7 +103,10 @@ public: unsigned size() const { return Stmts.size(); } bool empty() const { return Stmts.empty(); } - + + Stmt*& operator[](size_t i) { assert (i < size()); return Stmts[i]; } + Stmt* operator[](size_t i) const { assert (i < size()); return Stmts[i]; } + // CFG iterators typedef AdjacentBlocks::iterator pred_iterator; typedef AdjacentBlocks::const_iterator const_pred_iterator; |