diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-14 20:57:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-14 20:57:13 +0000 |
commit | a6ca65075490a1f217bbe5f83fe7b80e821df2d8 (patch) | |
tree | 8bb019267d9f1482c53c67255c8cc86b501516fb | |
parent | 96a063a70ca6374c401642c2a88ec1f11697b7ae (diff) | |
download | clang-a6ca65075490a1f217bbe5f83fe7b80e821df2d8.tar.gz |
Minor cleanups for constructor initialization in InitializationSequence
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaInit.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaInit.h | 2 | ||||
-rw-r--r-- | utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 785e40b165..c7994a06c3 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -2474,7 +2474,7 @@ static void TryConstructorInitialization(Sema &S, 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 @@ InitializationSequence::Perform(Sema &S, // 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 7f28baa9bd..2c05196fb1 100644 --- a/lib/Sema/SemaInit.h +++ b/lib/Sema/SemaInit.h @@ -307,7 +307,7 @@ public: 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 c90f4f3db4..2fe01d2ffd 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 @@ root = getRoot(config) # 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, |