]> granicus.if.org Git - clang/commitdiff
Replace a use of hasTrivialDefaultConstructor() with the appropriate
authorDouglas Gregor <dgregor@apple.com>
Thu, 23 Feb 2012 17:07:43 +0000 (17:07 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 23 Feb 2012 17:07:43 +0000 (17:07 +0000)
isTrivial() call.

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

lib/CodeGen/CGExprCXX.cpp

index af9c7662386858dcb15201faecfa518b2c54a326..3fe7f8c99da0d47eb98b3a73c64017641d2a3154 100644 (file)
@@ -895,7 +895,7 @@ static void EmitNewInitializer(CodeGenFunction &CGF, const CXXNewExpr *E,
     if (const CXXConstructExpr *CCE = dyn_cast_or_null<CXXConstructExpr>(Init)){
       CXXConstructorDecl *Ctor = CCE->getConstructor();
       bool RequiresZeroInitialization = false;
-      if (Ctor->getParent()->hasTrivialDefaultConstructor()) {
+      if (Ctor->isTrivial()) {
         // If new expression did not specify value-initialization, then there
         // is no initialization.
         if (!CCE->requiresZeroInitialization() || Ctor->getParent()->isEmpty())