[LLVMdev] Inline hint for methods defined in-class

Krzysztof Parzyszek kparzysz at codeaurora.org
Wed Jul 8 14:26:33 PDT 2015


On 6/24/2015 4:52 PM, Robinson, Paul wrote:
>
> The patch causes all in-class-defined methods to be treated as if
> they had the 'inline' keyword attached.
> Therefore, with the patch, explicitly adding the 'inline' keyword to
> these methods has no effect; it becomes noise.

It is redundant.  Why is this a concern?  IIRC, the C++ standard has 
always defined in-class functions as "inline".
I have always treated in-class functions as inline whenever I wrote 
them.  I'm surprised to hear that there are people who are unaware of 
this relationship, as this is a fairly basic feature of C++.
I think we should treat these functions the way the standard requires it.


-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list