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 cons... Robert F-C via Phabricator via cfe-commits

Reply via email to