Minor cleanups for constructor initialization in InitializationSequence
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 785e40b..c7994a0 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -2474,7 +2474,7 @@
const InitializationKind &Kind,
Expr **Args, unsigned NumArgs,
InitializationSequence &Sequence) {
- Sequence.setSequenceKind(InitializationSequence::ConstructorConversion);
+ Sequence.setSequenceKind(InitializationSequence::ConstructorInitialization);
// Build the candidate set directly in the initialization sequence
// structure, so that it will persist if we fail.
@@ -2885,7 +2885,7 @@
// we're supposed to start the conversion from the solitary initializer or
// from the set of arguments.
if (Kind.getKind() == InitializationKind::IK_Copy ||
- SequenceKind == ReferenceBinding) {
+ SequenceKind != ConstructorInitialization) {
assert(Args.size() == 1);
CurInit = Sema::OwningExprResult(S, Args.release()[0]);
if (CurInit.isInvalid())
diff --git a/lib/Sema/SemaInit.h b/lib/Sema/SemaInit.h
index 7f28baa..2c05196 100644
--- a/lib/Sema/SemaInit.h
+++ b/lib/Sema/SemaInit.h
@@ -307,7 +307,7 @@
UserDefinedConversion,
/// \brief A constructor call.
- ConstructorConversion,
+ ConstructorInitialization,
/// \brief A reference binding.
ReferenceBinding,
diff --git a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg
index c90f4f3..2fe01d2 100644
--- a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg
+++ b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg
@@ -11,6 +11,7 @@
# testFormat: The test format to use to interpret tests.
target_obj_root = root.llvm_obj_root
+target_obj_root = '/Users/dgregor/Projects/llvm-build-autotools'
cxxflags = ['-D__STDC_LIMIT_MACROS',
'-D__STDC_CONSTANT_MACROS',
'-I%s/include' % root.llvm_src_root,