Skip to content
Snippets Groups Projects
Commit 7349dc07 authored by Francois Ferrand's avatar Francois Ferrand
Browse files

clang-format: merge short case labels with trailing comments

Summary:
Allow merging short case labels when they actually end with a comment
(like a comment after the ``break``) and when followed by switch-level
comments (e.g. aligned with next case):

  switch(a) {
  case 0: break; // comment at end of case
  case 1: return value;
  // comment related to next case
  // comment related to next case
  case 2:
  }

Reviewers: krasimir, djasper

Reviewed By: krasimir

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D35557

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309370 91177308-0d34-0410-b5e6-96231b3b80d8
parent 76d3dfdd
Branches
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment