[PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines

2019-08-26 Thread Robert F-C via Phabricator via cfe-commits
rfairliecuninghame added a comment.

I also think this feature bears further consideration.

I understand that google and other coding standard currently allows this, but I 
feel there's a certain degree of inconsistency in their doing so. 
None of the open main coding standards would recommend or allow putting 
multiple variable initializations/assignments per line but this is effectively 
what is occurring in allowing this. 
After all,

  MyClass::MyClass(long _state1Long, short _state2Short, int *_state3Ptr)
: state1Long(_state1Long), state2Short(_state2Short), 
state3Ptr(*_state3Ptr) {
  }

is conceptually much the same as

  MyClass::MyClass(long _state1Long, short _state2Short, int *_state3Ptr) {
state1Long = _state1Long; state2Short = _state2Short; state3Ptr = 
*_state3Ptr;
  }

which you would of course never allow.
I'm sure this conceptual inconsistency is apparent to a fair number of other 
C++ style guide writers where a one-per-line limitation on constructor 
initializers is mandated. [I'm in a similar position to JVApen and have had to 
patch the program to order to meet this requirement at my workplace.] Anyway, 
just an observation on the matter.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D14484/new/

https://reviews.llvm.org/D14484



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines

2019-08-26 Thread Robert F-C via Phabricator via cfe-commits
rfairliecuninghame added a comment.

The excellent and extensive Poco library project (https://pocoproject.org/) is 
an open-source example which limits constructor initializers to one-per-line 
(StyleGuide here: http://www.appinf.com/download/CppCodingStyleGuide.pdf, 
random example: 
https://github.com/pocoproject/poco/blob/master/Foundation/src/Base64Decoder.cpp).


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D14484/new/

https://reviews.llvm.org/D14484



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits