From: Stephen Hines Date: Fri, 16 Sep 2016 07:21:24 +0000 (+0000) Subject: Fix unused result from sign extending an Offset. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fec73ad09e1a9749b13f2b391baf7f252514c092;p=platform%2Fupstream%2Fllvm.git 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 --- 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; }