I have comments in my code:
//asdf
when I use clang-format on it, it adds a space immediately after // characters:
// asdf
How can I prevent this from clang style configuration?
thanks
Combining the answers to these two questions should solve the problem:
So, the following line in your .clang-format file should do the trick (I have not tested it):
.clang-format
CommentPragmas: '^[^ ]'
This says that clang-format does not interfere with comments starting with something other than a space.
For completeness of clang format documentation here .