Skip to content

Instantly share code, notes, and snippets.

@clemensg
Last active February 10, 2020 13:30
Show Gist options
  • Save clemensg/76a0c214d8d328a8502da9d05ef5d863 to your computer and use it in GitHub Desktop.
Save clemensg/76a0c214d8d328a8502da9d05ef5d863 to your computer and use it in GitHub Desktop.
Bug 34649 - clang-format messes up comment indentations - Problem 1
unsigned int
/* a = 1, */ /* Comment A */
b = 2, /* Comment B */
c = 3; /* Comment C */
int main(int argc, char *argv[])
{
return 0;
}
@clemensg
Copy link
Author

clemensg commented Feb 10, 2020

clang-format 9.0.0 changes it to:

unsigned int
    /* a = 1, */ /* Comment A */
        b = 2,   /* Comment B */
    c = 3;       /* Comment C */

int main(int argc, char *argv[])
{
  return 0;
}

I think it should stay as it was, instead.. (or if indenting b = 2, ..is intended, it should also indent c = 3; .... But why only the b = 2, ..?)

.clang-format being used is https://gist.github.com/clemensg/be1dc3f2c4442a995cba3d8068917848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment