]> granicus.if.org Git - clang/commitdiff
Initialize the non-trivial C union bits I added to RecordDeclBitfields
authorAkira Hatanaka <ahatanaka@apple.com>
Sat, 13 Jul 2019 03:59:55 +0000 (03:59 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Sat, 13 Jul 2019 03:59:55 +0000 (03:59 +0000)
in r365985

These bits weren't being initialized in the RecordDecl's constructor,
which probably caused test/Modules/stress1.cpp to fail on a couple of
bots.

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

lib/AST/Decl.cpp

index 21dd5425834a93687f9996667974784074df38fc..21cf9da18a8b238b0cdfdf480ff28adc3c0bf62e 100644 (file)
@@ -4252,6 +4252,9 @@ RecordDecl::RecordDecl(Kind DK, TagKind TK, const ASTContext &C,
   setNonTrivialToPrimitiveDefaultInitialize(false);
   setNonTrivialToPrimitiveCopy(false);
   setNonTrivialToPrimitiveDestroy(false);
+  setHasNonTrivialToPrimitiveDefaultInitializeCUnion(false);
+  setHasNonTrivialToPrimitiveDestructCUnion(false);
+  setHasNonTrivialToPrimitiveCopyCUnion(false);
   setParamDestroyedInCallee(false);
   setArgPassingRestrictions(APK_CanPassInRegs);
 }