aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp3
-rw-r--r--lib/Sema/SemaExpr.cpp11
-rw-r--r--lib/Sema/SemaExprCXX.cpp1
-rw-r--r--lib/Sema/SemaExprObjC.cpp3
-rw-r--r--lib/Sema/SemaOverload.cpp6
5 files changed, 16 insertions, 8 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 00f71a2bd4..b171d85ee0 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -125,7 +125,8 @@ Sema::SetParamDefaultArgument(ParmVarDecl *Param, Expr *Arg,
// the same semantic constraints as the initializer expression in
// a declaration of a variable of the parameter type, using the
// copy-initialization semantics (8.5).
- InitializedEntity Entity = InitializedEntity::InitializeParameter(Param);
+ InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
+ Param);
InitializationKind Kind = InitializationKind::CreateCopy(Param->getLocation(),
EqualLoc);
InitializationSequence InitSeq(*this, Entity, Kind, &Arg, 1);
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 51ef01fce8..c22b5e5bb6 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3435,7 +3435,7 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
// Check the expression as an initializer for the parameter.
InitializedEntity Entity
- = InitializedEntity::InitializeParameter(Param);
+ = InitializedEntity::InitializeParameter(Context, Param);
InitializationKind Kind
= InitializationKind::CreateCopy(Param->getLocation(),
/*FIXME:EqualLoc*/UninstExpr->getSourceRange().getBegin());
@@ -3564,10 +3564,9 @@ bool Sema::GatherArgumentsForCall(SourceLocation CallLoc,
if (FDecl && i < FDecl->getNumParams())
Param = FDecl->getParamDecl(i);
-
InitializedEntity Entity =
- Param? InitializedEntity::InitializeParameter(Param)
- : InitializedEntity::InitializeParameter(ProtoArgType);
+ Param? InitializedEntity::InitializeParameter(Context, Param)
+ : InitializedEntity::InitializeParameter(Context, ProtoArgType);
ExprResult ArgE = PerformCopyInitialization(Entity,
SourceLocation(),
Owned(Arg));
@@ -6232,12 +6231,12 @@ void Sema::ConvertPropertyAssignment(Expr *LHS, Expr *&RHS, QualType& LHSTy) {
LHSTy->isRecordType());
if (copyInit) {
InitializedEntity Entity =
- InitializedEntity::InitializeParameter(LHSTy);
+ InitializedEntity::InitializeParameter(Context, LHSTy);
Expr *Arg = RHS;
ExprResult ArgE = PerformCopyInitialization(Entity, SourceLocation(),
Owned(Arg));
if (!ArgE.isInvalid())
- RHS = ArgE.takeAs<Expr>();
+ RHS = ArgE.takeAs<Expr>();
}
}
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 80dbe459ce..f30fcf7312 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1194,6 +1194,7 @@ bool Sema::FindAllocationOverload(SourceLocation StartLoc, SourceRange Range,
for (unsigned i = 0; (i < NumArgs && i < NumArgsInFnDecl); ++i) {
ExprResult Result
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(i)),
SourceLocation(),
Owned(Args[i]->Retain()));
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index e9295ebb24..a9c7a727f1 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -241,7 +241,8 @@ bool Sema::CheckMessageArgumentTypes(Expr **Args, unsigned NumArgs,
<< argExpr->getSourceRange()))
return true;
- InitializedEntity Entity = InitializedEntity::InitializeParameter(Param);
+ InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
+ Param);
ExprResult ArgE = PerformCopyInitialization(Entity,
SourceLocation(),
Owned(argExpr->Retain()));
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index bd971b793a..696e5b289c 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -6864,6 +6864,7 @@ Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, unsigned OpcIn,
// Convert the arguments.
ExprResult InputInit
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(0)),
SourceLocation(),
Input);
@@ -7045,6 +7046,7 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
ExprResult Arg1
= PerformCopyInitialization(
InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(0)),
SourceLocation(),
Owned(Args[1]));
@@ -7061,6 +7063,7 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
ExprResult Arg0
= PerformCopyInitialization(
InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(0)),
SourceLocation(),
Owned(Args[0]));
@@ -7070,6 +7073,7 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
ExprResult Arg1
= PerformCopyInitialization(
InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(1)),
SourceLocation(),
Owned(Args[1]));
@@ -7229,6 +7233,7 @@ Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
// Convert the arguments.
ExprResult InputInit
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
+ Context,
FnDecl->getParamDecl(0)),
SourceLocation(),
Owned(Args[1]));
@@ -7666,6 +7671,7 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object,
ExprResult InputInit
= PerformCopyInitialization(InitializedEntity::InitializeParameter(
+ Context,
Method->getParamDecl(i)),
SourceLocation(), Arg);