From fec73ad09e1a9749b13f2b391baf7f252514c092 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Fri, 16 Sep 2016 07:21:24 +0000 Subject: [PATCH] Fix unused result from sign extending an Offset. Summary: Offset was doubled in size, but the assignment was missing. We just need to reassign to the original variable in this case to fix it. Reviewers: cfe-commits, echristo Subscribers: meikeb Differential Revision: https://reviews.llvm.org/D24648 llvm-svn: 281706 --- clang/lib/Sema/SemaChecking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index deb3860..1e17afc0 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -3882,7 +3882,7 @@ static void sumOffsets(llvm::APSInt &Offset, llvm::APSInt Addend, // possible. if (Ov) { assert(BitWidth <= UINT_MAX / 2 && "index (intermediate) result too big"); - Offset.sext(2 * BitWidth); + Offset = Offset.sext(2 * BitWidth); sumOffsets(Offset, Addend, BinOpKind, AddendIsRight); return; } -- 2.7.4