sext should probably be marked WARN_UNUSED_RESULT

On Thursday, September 15, 2016, Stephen Hines via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> srhines created this revision.
> srhines added a reviewer: cfe-commits.
> srhines added a subscriber: meikeb.
>
> 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.
>
> https://reviews.llvm.org/D24648
>
> Files:
>   lib/Sema/SemaChecking.cpp
>
> Index: lib/Sema/SemaChecking.cpp
> ===================================================================
> --- lib/Sema/SemaChecking.cpp
> +++ lib/Sema/SemaChecking.cpp
> @@ -3882,7 +3882,7 @@
>    // 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;
>    }
>
>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to