diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-02-16 09:31:36 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-02-16 09:31:36 +0000 |
commit | fd035e6496665b1f1197868e21cb0a4594e8db6e (patch) | |
tree | 53010172e19c77ea447bcd89e117cda052ab52e0 /lib/Sema/SemaInit.h | |
parent | 2fce988e86bc01829142e4362d4eff1af0925147 (diff) | |
download | FreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.zip FreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.tar.gz |
Update clang to r96341.
Diffstat (limited to 'lib/Sema/SemaInit.h')
-rw-r--r-- | lib/Sema/SemaInit.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/lib/Sema/SemaInit.h b/lib/Sema/SemaInit.h index d7d3756..2b49df2 100644 --- a/lib/Sema/SemaInit.h +++ b/lib/Sema/SemaInit.h @@ -15,12 +15,17 @@ #include "SemaOverload.h" #include "clang/AST/Type.h" +#include "clang/AST/UnresolvedSet.h" #include "clang/Parse/Action.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallVector.h" #include <cassert> +namespace llvm { + class raw_ostream; +} + namespace clang { class CXXBaseSpecifier; @@ -62,7 +67,6 @@ public: /// \brief The entity being initialized is an element of a vector. /// or vector. EK_VectorElement - }; private: @@ -91,8 +95,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; }; @@ -197,6 +201,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 { @@ -440,7 +450,11 @@ public: /// \brief When Kind == SK_ResolvedOverloadedFunction or Kind == /// SK_UserConversion, the function that the expression should be /// resolved to or the conversion function to call, respectively. - FunctionDecl *Function; + /// + /// Always a FunctionDecl. + /// For conversion decls, the naming class is the source type. + /// For construct decls, the naming class is the target type. + DeclAccessPair Function; /// \brief When Kind = SK_ConversionSequence, the implicit conversion /// sequence @@ -607,7 +621,9 @@ public: /// \brief Add a new step invoking a conversion function, which is either /// a constructor or a conversion function. - void AddUserConversionStep(FunctionDecl *Function, QualType T); + void AddUserConversionStep(FunctionDecl *Function, + AccessSpecifier Access, + QualType T); /// \brief Add a new step that performs a qualification conversion to the /// given type. @@ -622,6 +638,7 @@ public: /// \brief Add a constructor-initialization step. void AddConstructorInitializationStep(CXXConstructorDecl *Constructor, + AccessSpecifier Access, QualType T); /// \brief Add a zero-initialization step. @@ -658,6 +675,14 @@ public: assert(getKind() == FailedSequence && "Not an initialization failure!"); return Failure; } + + /// \brief Dump a representation of this initialization sequence to + /// the given stream, for debugging purposes. + void dump(llvm::raw_ostream &OS) const; + + /// \brief Dump a representation of this initialization sequence to + /// standard error, for debugging purposes. + void dump() const; }; } // end namespace clang |