[PATCH] Add minnum / maxnum to APFloat

Justin Bogner mail at justinbogner.com
Thu Oct 9 23:40:15 PDT 2014


Justin Bogner <mail at justinbogner.com> writes:
> Matt Arsenault <Matthew.Arsenault at amd.com> writes:
>> --- include/llvm/ADT/APFloat.h
>> +++ include/llvm/ADT/APFloat.h
>> @@ -617,6 +617,12 @@
>>  /// This additional declaration is required in order to compile LLVM with IBM
>>  /// xlC compiler.
>>  hash_code hash_value(const APFloat &Arg);
>> +
>> +LLVM_READONLY
>> +APFloat minnum(const APFloat &, const APFloat &);
>> +
>> +LLVM_READONLY
>> +APFloat maxnum(const APFloat &, const APFloat &);
>>  } // namespace llvm
>
> This is very pedantic, feel free to ignore me.
>
> I was going to complain that you should clang-format this, but I guess
> you probably did. I think these should read like:
>
>   LLVM_READONLY APFloat minnum(const APFloat &, const APFloat &);
>
> Filed a bug about clang-format adding an unnecessary line break here:
> http://llvm.org/bugs/show_bug.cgi?id=21237

Apparently clang-format deliberately leaves this formatting up to the
user. It's more consistent with LLVM style to put these declarations on
one line, but I won't make a big fuss about it.



More information about the llvm-commits mailing list