[PATCH] D58016: fixes copy constructor generation of classes containing 0-length arrays followed by exactly 1 trivial field (fixes #40682)
Joran Bigalet via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 10 11:10:43 PST 2019
jbigalet created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58016
Files:
clang/lib/CodeGen/CGClass.cpp
Index: clang/lib/CodeGen/CGClass.cpp
===================================================================
--- clang/lib/CodeGen/CGClass.cpp
+++ clang/lib/CodeGen/CGClass.cpp
@@ -1012,7 +1012,7 @@
if (FOffset < FirstFieldOffset) {
FirstField = F;
FirstFieldOffset = FOffset;
- } else if (FOffset > LastFieldOffset) {
+ } else if (FOffset >= LastFieldOffset) {
LastField = F;
LastFieldOffset = FOffset;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58016.186157.patch
Type: text/x-patch
Size: 462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190210/d282640c/attachment.bin>
More information about the cfe-commits
mailing list