]> granicus.if.org Git - clang/commitdiff
Remove some trivial uses of hasTrivialCopyConstructor() and
authorDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:55:51 +0000 (07:55 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:55:51 +0000 (07:55 +0000)
hasTrivialMoveConstructor().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151354 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprConstant.cpp

index 85aa5ee81efd23b55da11f91d26129c7a5d58cf8..b69a805f785aba91e4f17960285b6132e57e14de 100644 (file)
@@ -2225,8 +2225,8 @@ static bool HandleConstructorCall(SourceLocation CallLoc, const LValue &This,
   // essential for unions, where the operations performed by the constructor
   // cannot be represented by ctor-initializers.
   if (Definition->isDefaulted() &&
-      ((Definition->isCopyConstructor() && RD->hasTrivialCopyConstructor()) ||
-       (Definition->isMoveConstructor() && RD->hasTrivialMoveConstructor()))) {
+      ((Definition->isCopyConstructor() && Definition->isTrivial()) ||
+       (Definition->isMoveConstructor() && Definition->isTrivial()))) {
     LValue RHS;
     RHS.setFrom(ArgValues[0]);
     CCValue Value;