D15532: [Astyle] Add Objective C to list of languages with formatters

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Sep 21 05:16:15 BST 2018


kossebau added inline comments.

INLINE COMMENTS

> aaronpuchert wrote in astyle_plugin.cpp:36
> The advice is mostly important for exported symbols, see Ulrich Drepper: How To Write Shared Libraries <https://www.akkadia.org/drepper/dsohowto.pdf>, section 2.4. For `static` (internal linkage) variables the compiler knows all references to the variable, so it can remove the indirection and see that it is const (if it is).
> 
> Nevertheless, it obviously doesn't hurt to get used to writing `char[]`, because sometimes it does matter.
> 
> By the way, even more modern would be `static constexpr char[]`.

Not yet firm with constexpr myself, so curious to learn what would one gain from using `static constexpr char[]` here? What exactly would be buildtime evaluated?
I think I have seen constexpr already in KDevelop code, so if that is a better version, would be interested to improve all similar places.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15532

To: rjvbb, #kdevelop, kossebau, kfunk
Cc: aaronpuchert, kfunk, pino, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180921/4f36517f/attachment-0001.html>


More information about the KDevelop-devel mailing list