summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2019-04-10 18:07:18 +0000
committerJohn McCall <rjmccall@apple.com>2019-04-10 18:07:18 +0000
commit7ae29f574260811ce12fcf09bf5b27e058e2719e (patch)
tree8d7fb9641209d5e0a51bb0dd2e479e0547ea5c29 /clang/lib/CodeGen/CGClass.cpp
parent4e3fd7757aa7d1b6193f74527c85bbcd76e54a66 (diff)
downloadbcm5719-llvm-7ae29f574260811ce12fcf09bf5b27e058e2719e.tar.gz
bcm5719-llvm-7ae29f574260811ce12fcf09bf5b27e058e2719e.zip
Fix an off-by-one mistake in IRGen's copy-construction
special cases in the presence of zero-length arrays. Patch by Joran Bigalet! llvm-svn: 358115
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index d16cae676d9..9e1312b786d 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -1008,7 +1008,7 @@ namespace {
if (FOffset < FirstFieldOffset) {
FirstField = F;
FirstFieldOffset = FOffset;
- } else if (FOffset > LastFieldOffset) {
+ } else if (FOffset >= LastFieldOffset) {
LastField = F;
LastFieldOffset = FOffset;
}
OpenPOWER on IntegriCloud