From 9b5a22370ec5d6e02582144e4b10802d7278b37c Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 24 May 2017 07:00:55 +0000 Subject: [PATCH] [APInt] Use std::end to avoid mentioning the size of a local buffer repeatedly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303726 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/APInt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 2a916b14bc2..e9716e3b1e8 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -2045,7 +2045,7 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, if (isSingleWord()) { char Buffer[65]; - char *BufPtr = Buffer+65; + char *BufPtr = std::end(Buffer); uint64_t N; if (!Signed) { @@ -2069,7 +2069,7 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, *--BufPtr = Digits[N % Radix]; N /= Radix; } - Str.append(BufPtr, Buffer+65); + Str.append(BufPtr, std::end(Buffer)); return; } -- 2.11.0