r209477 - Use error_code::success() instead of make_error_code(llvm::errc::success).

Alexander Kornienko alexfh at google.com
Fri May 23 00:02:27 PDT 2014


Slightly shorter and more expensive, I would say.
On 23 May 2014 08:16, "Tobias Grosser" <tobias at grosser.es> wrote:

>
> On 23/05/2014 00:06, Alexander Kornienko wrote:
>
>> Author: alexfh
>> Date: Thu May 22 17:06:08 2014
>> New Revision: 209477
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=209477&view=rev
>> Log:
>> Use error_code::success() instead of make_error_code(llvm::errc::
>> success).
>>
>>
>> Modified:
>>      cfe/trunk/lib/Format/Format.cpp
>>
>> Modified: cfe/trunk/lib/Format/Format.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/
>> Format.cpp?rev=209477&r1=209476&r2=209477&view=diff
>> ============================================================
>> ==================
>> --- cfe/trunk/lib/Format/Format.cpp (original)
>> +++ cfe/trunk/lib/Format/Format.cpp Thu May 22 17:06:08 2014
>> @@ -482,7 +482,7 @@ llvm::error_code parseConfiguration(Stri
>>           Styles[i].Language == FormatStyle::LK_None) {
>>         *Style = Styles[i];
>>         Style->Language = Language;
>> -      return llvm::make_error_code(llvm::errc::success);
>> +      return llvm::error_code::success();
>>
>
> Just out of interest, what is the improvement. Just because it is slightly
> shorter?
>
>        }
>>     }
>>     return llvm::make_error_code(llvm::errc::not_supported);
>>
>
> Should this line be changed too?
>
> Tobias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140523/05ccef8d/attachment.html>


More information about the cfe-commits mailing list