aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Parse/Action.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Parse/Action.h')
-rw-r--r--include/clang/Parse/Action.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h
index 678e62e10b..a07c99d9f0 100644
--- a/include/clang/Parse/Action.h
+++ b/include/clang/Parse/Action.h
@@ -64,7 +64,21 @@ namespace clang {
/// parse to complete accurately. The MinimalAction class does this
/// bare-minimum of tracking to implement this functionality.
class Action : public ActionBase {
+ /// \brief The parser's current scope.
+ ///
+ /// The parser maintains this state here so that is accessible to \c Action
+ /// subclasses via \c getCurScope().
+ Scope *CurScope;
+
+protected:
+ friend class Parser;
+
+ /// \brief Retrieve the parser's current scope.
+ Scope *getCurScope() const { return CurScope; }
+
public:
+ Action() : CurScope(0) { }
+
/// Out-of-line virtual destructor to provide home for this class.
virtual ~Action();