galenelias added a comment.

Well, I guess I didn't put quite enough thought into the `AlignCaseColons` 
option.  While this solves the empty case label problem, it will also match in 
non-short case label scenarios such as the following, which doesn't seem 
desirable:

  switch (level) {
  case log::info  :
  case log::error :
    return true;
  case log::none     :
  case log::warning  :
  case log::critical :
    return false;
  }

In order to solve this (and the other) issues, I think the only solution is to 
roll a custom alignment method instead of using `AlignTokens`, so that the 
alignment can be more correctly based on the detection of short case statements.

This is going to take considerably more time and code, so not sure when I'll be 
able to work on it.


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

https://reviews.llvm.org/D151761

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

Reply via email to