diff options
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Pointer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp index 7c6eb74..89d9829 100644 --- a/clang/lib/AST/ByteCode/Pointer.cpp +++ b/clang/lib/AST/ByteCode/Pointer.cpp @@ -375,6 +375,8 @@ size_t Pointer::computeOffsetForComparison() const { } if (const Record *R = P.getBase().getRecord(); R && R->isUnion()) { + if (P.isOnePastEnd()) + ++Result; // Direct child of a union - all have offset 0. P = P.getBase(); continue; |