.clang-format: AlignTrailingComments: true ColumnLimit: 80 What we have upon clang-format: int a_short; // some 1-byte UTF8 comment with some good and neat info int a_veryverylong; // some one-byte UTF8 comment breaks correctly at 80 char // boundary int a_short_rus; // А теперь комментарии, например, на русском, 2-байта int a_veryverylong_rus; // Верхний коммент еще не превысил границу в 80, однако // уже отодвинут. Перенос, при этом, отрабатывает верно ------------- What we should have: int a_short; // some 1-byte UTF8 comment with some good info int a_veryverylong; // some one-byte UTF8 comment breaks correctly at 80 char // boundary int a_short_rus; // А теперь комментарии, например, на русском, 2-байта int a_veryverylong_rus; // Верхний коммент еще не превысил границу в 80, однако // уже отодвинут. Перенос, при этом, отрабатывает верно ------------- Russian trailing comments go as UTF-8 2-byte characters, and, obviously, clang-format counts their length as raw byte count when checking if line is exceeded. As a result, comments fall back closer to code, while still having enough space for being aligned. This is relevant only for trailing comment alignment tirgger check. Line break upon exceeding 80 character limit works correctly for multi-byte characters.