[PATCH] D10990: Fix for clang memcpyizer bugs 23911 and 23924

John McCall rjmccall at gmail.com
Tue Jul 7 10:11:37 PDT 2015


================
Comment at: lib/CodeGen/CGClass.cpp:1105
@@ -1098,1 +1104,3 @@
+                ? IndirectField->getAnonField()->getType()
+                : Field->getType();
         QualType::DestructionKind dtorKind = FieldType.isDestructedType();
----------------
Wow, the old code here was really impressively broken.  Saved by the rule of 3/5, I guess.

Okay, two code organization requests.  Please add a method on CXXCtorInitializer to get the type of the initialized member.  Then, please extract a function in this file to drill down to the initialized member of a CXXCtorInitializer.

With that combination, the code here should end up looking really straightforward.

Please also update EmitMemberInitializer to use your new functions.


Repository:
  rL LLVM

http://reviews.llvm.org/D10990







More information about the cfe-commits mailing list