]> granicus.if.org Git - clang/commitdiff
Minor cleanups for constructor initialization in InitializationSequence
authorDouglas Gregor <dgregor@apple.com>
Mon, 14 Dec 2009 20:57:13 +0000 (20:57 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 14 Dec 2009 20:57:13 +0000 (20:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91325 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp
lib/Sema/SemaInit.h
utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg

index 785e40b16526d4b34af36705b861e496c98159ca..c7994a06c3a5edd85148d28f3fb5e6b706025c8f 100644 (file)
@@ -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())
index 7f28baa9bd2138152befe6f05729e0c7c934f63f..2c05196fb1728e37126fecd218a5eeb179ff44d0 100644 (file)
@@ -307,7 +307,7 @@ public:
     UserDefinedConversion,
     
     /// \brief A constructor call.
-    ConstructorConversion,
+    ConstructorInitialization,
     
     /// \brief A reference binding.
     ReferenceBinding,
index c90f4f3db488e0f9914846af68ef904550681cbe..2fe01d2ffd15d3e17a92677e3073ddae9cc2c9c4 100644 (file)
@@ -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,