aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-23 17:40:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-23 17:40:29 +0000
commite1a5c17bffba76d20efa89d1d74e5f44159a67bd (patch)
treeb76a00209a1f51ffa4da03395959c2fe8daf36f0
parentc5143c538783a2834cfdc3d29db0ff76e857818f (diff)
Fix DISABLE_SMART_POINTERS build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Parse/Ownership.h2
-rw-r--r--lib/Sema/SemaOverload.cpp11
-rw-r--r--utils/C++Tests/LLVM-Code-Compile/lit.local.cfg1
-rw-r--r--utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg3
4 files changed, 10 insertions, 7 deletions
diff --git a/include/clang/Parse/Ownership.h b/include/clang/Parse/Ownership.h
index 5eb9635f06..ed1b068f81 100644
--- a/include/clang/Parse/Ownership.h
+++ b/include/clang/Parse/Ownership.h
@@ -166,7 +166,7 @@ namespace llvm {
// conversions.
// Flip this switch to measure performance impact of the smart pointers.
-//#define DISABLE_SMART_POINTERS
+#define DISABLE_SMART_POINTERS
namespace llvm {
template<>
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 8b5a72de36..d932f21f79 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -5001,14 +5001,15 @@ Sema::OwningExprResult Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc,
return ExprError();
} else {
// Convert the arguments.
- input = PerformCopyInitialization(
- InitializedEntity::InitializeParameter(
+ OwningExprResult InputInit
+ = PerformCopyInitialization(InitializedEntity::InitializeParameter(
FnDecl->getParamDecl(0)),
- SourceLocation(),
- move(input));
- if (input.isInvalid())
+ SourceLocation(),
+ move(input));
+ if (InputInit.isInvalid())
return ExprError();
+ input = move(InputInit);
Input = (Expr *)input.get();
}
diff --git a/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg b/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg
index 6676e311e3..b9931144a3 100644
--- a/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg
+++ b/utils/C++Tests/LLVM-Code-Compile/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',
'-Wno-sign-compare',
diff --git a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg
index 6e679659c4..a2b5b7b036 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,
@@ -49,6 +50,6 @@ cxxflags = ['-D__STDC_LIMIT_MACROS',
config.test_format = \
lit.formats.OneCommandPerFileTest(command=[root.clang,
'-fsyntax-only'] + cxxflags,
- dir='%s/lib' % root.llvm_src_root,
+ dir='%s' % root.llvm_src_root,
recursive=True,
pattern='^(.*\\.cpp)$')