summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-09-15 10:14:12 +0000
committerJohn McCall <rjmccall@apple.com>2010-09-15 10:14:12 +0000
commit7a626f63f7091212a1d2f941c8bee5f482223bfa (patch)
tree80a6ae297730f708626a2b8e004fb5585eb0166a /clang/lib/Sema/SemaInit.cpp
parentd88d759a74f1b79cdd45b27f5c1c56cf2d0a472e (diff)
downloadbcm5719-llvm-7a626f63f7091212a1d2f941c8bee5f482223bfa.tar.gz
bcm5719-llvm-7a626f63f7091212a1d2f941c8bee5f482223bfa.zip
one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly llvm-svn: 113962
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 60d2acec072..1ffa70207ab 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -3303,8 +3303,7 @@ static ExprResult CopyObject(Sema &S,
// elision for return statements and throw expressions are handled as part
// of constructor initialization, while copy elision for exception handlers
// is handled by the run-time.
- bool Elidable = CurInitExpr->isTemporaryObject() &&
- S.Context.hasSameUnqualifiedType(T, CurInitExpr->getType());
+ bool Elidable = CurInitExpr->isTemporaryObject(S.Context, Class);
SourceLocation Loc;
switch (Entity.getKind()) {
case InitializedEntity::EK_Result:
OpenPOWER on IntegriCloud