ArrayRef'ize InitializationSequence constructor and InitializationSequence::Diagnose()
Patch by Robert Wilhelm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181022 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 8dfc8b9..f91305f 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -2309,7 +2309,7 @@
InitializationKind Kind
= InitializationKind::CreateCopy(Value->getLocStart(),
Value->getLocStart());
- InitializationSequence Seq(*this, Entity, Kind, &InitExpr, 1);
+ InitializationSequence Seq(*this, Entity, Kind, InitExpr);
// [...] If overload resolution fails, or if the type of the first
// parameter of the selected constructor is not an rvalue reference
@@ -2342,7 +2342,7 @@
// Complete type-checking the initialization of the return type
// using the constructor we found.
- Res = Seq.Perform(*this, Entity, Kind, MultiExprArg(&Value, 1));
+ Res = Seq.Perform(*this, Entity, Kind, Value);
}
}
}