[LLVMdev] Is append in APFloat broken?
David Blaikie
dblaikie at gmail.com
Wed Jul 25 11:05:17 PDT 2012
On Wed, Jul 25, 2012 at 12:56 AM, Olaf Krzikalla
<Olaf.Krzikalla at tu-dresden.de> wrote:
> Am 24.07.2012 18:50, schrieb David Blaikie:
>> Do you have a test case to go along with this?
> Unfortunately not. It just popped up as a result of a programming error
> made by me.
>
>> The simpler fix seems to be to untemplate this code& have "append"
>> take a StringRef. We can just rely on the compiler to optimize away
>> the strlen in StringRef's (const char*) ctor as we do across the rest
>> of the codebase. That way this won't go awry if append is called with
>> a large buffer or a string without a nul terminator, etc.
> This is of course fine, too.
Committed as r160744 - thanks for the report!
- David
More information about the llvm-dev
mailing list