diff options
Diffstat (limited to 'clang/lib/Sema/SemaInit.h')
-rw-r--r-- | clang/lib/Sema/SemaInit.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaInit.h b/clang/lib/Sema/SemaInit.h index 0b72fd4532d..001ba91d546 100644 --- a/clang/lib/Sema/SemaInit.h +++ b/clang/lib/Sema/SemaInit.h @@ -66,7 +66,6 @@ public: /// \brief The entity being initialized is an element of a vector. /// or vector. EK_VectorElement - }; private: @@ -95,8 +94,8 @@ private: /// base class. CXXBaseSpecifier *Base; - /// \brief When Kind = EK_ArrayOrVectorElement, the index of the - /// array or vector element being initialized. + /// \brief When Kind = EK_ArrayElement or EK_VectorElement, the + /// index of the array or vector element being initialized. unsigned Index; }; @@ -201,6 +200,12 @@ public: /// initialized. DeclaratorDecl *getDecl() const; + /// \brief Retrieve the base specifier. + CXXBaseSpecifier *getBaseSpecifier() const { + assert(getKind() == EK_Base && "Not a base specifier"); + return Base; + } + /// \brief Determine the location of the 'return' keyword when initializing /// the result of a function call. SourceLocation getReturnLoc() const { |