summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-22 16:09:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-22 16:09:06 +0000
commitbbeb5c391ca99b71ccb39df0aa7bc3197e66e0a6 (patch)
treec064d3177b3d7df344d596bccd97157bfce9f03f /clang/lib/Sema/SemaInit.h
parent1b3039344b1ed7814fad8539f04bd6fdf0d89536 (diff)
downloadbcm5719-llvm-bbeb5c391ca99b71ccb39df0aa7bc3197e66e0a6.tar.gz
bcm5719-llvm-bbeb5c391ca99b71ccb39df0aa7bc3197e66e0a6.zip
Switch parameter-passing for calls via function pointers (where we
don't have a FunctionDecl) over to InitializationSequence. llvm-svn: 91906
Diffstat (limited to 'clang/lib/Sema/SemaInit.h')
-rw-r--r--clang/lib/Sema/SemaInit.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.h b/clang/lib/Sema/SemaInit.h
index c5ba57c7264..959c55e3d32 100644
--- a/clang/lib/Sema/SemaInit.h
+++ b/clang/lib/Sema/SemaInit.h
@@ -105,8 +105,9 @@ private:
: Kind(EK_Parameter), Parent(0), Type(Parm->getType()),
VariableOrMember(reinterpret_cast<DeclaratorDecl*>(Parm)) { }
- /// \brief Create the initialization entity for the result of a function,
- /// throwing an object, or performing an explicit cast.
+ /// \brief Create the initialization entity for the result of a
+ /// function, throwing an object, performing an explicit cast, or
+ /// initializing a parameter for which there is no declaration.
InitializedEntity(EntityKind Kind, SourceLocation Loc, QualType Type)
: Kind(Kind), Parent(0), Type(Type), Location(Loc.getRawEncoding()) { }
@@ -130,6 +131,12 @@ public:
return InitializedEntity(Parm);
}
+ /// \brief Create the initialization entity for a parameter that is
+ /// only known by its type.
+ static InitializedEntity InitializeParameter(QualType Type) {
+ return InitializedEntity(EK_Parameter, SourceLocation(), Type);
+ }
+
/// \brief Create the initialization entity for the result of a function.
static InitializedEntity InitializeResult(SourceLocation ReturnLoc,
QualType Type) {
OpenPOWER on IntegriCloud