]> granicus.if.org Git - clang/commitdiff
Kill a spurious use of hasTrivialDefaultConstructor()
authorDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:48:37 +0000 (07:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 24 Feb 2012 07:48:37 +0000 (07:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151353 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index 55ab8dda3645f9c07032cebbd72ac3a91128c877..756f130b7fdcca0a00bfd2b8ba76e8de4daae8fb 100644 (file)
@@ -4631,8 +4631,7 @@ PerformConstructorInitialization(Sema &S,
     CXXRecordDecl *ClassDecl = Constructor->getParent();
     assert(ClassDecl && "No parent class for constructor.");
     if (Constructor->isDefaulted() && Constructor->isDefaultConstructor() &&
-        ClassDecl->hasTrivialDefaultConstructor() &&
-        !Constructor->isUsed(false))
+        Constructor->isTrivial() && !Constructor->isUsed(false))
       S.DefineImplicitDefaultConstructor(Loc, Constructor);
   }