Hi everyone,
The latest released clang-format
(19.1.5) cannot sort includes and remove duplicates if those are preceded with /* */
comments containing backslashes.
clang-format
18.1.8 produces correct results.
The problem can be reproduced regardless of the presence or contents of .clang-format
.
Example:
~ » cat a.cpp
/* COPYRIGHT *\
\* (C) 2024 */
#include <b>
#include <a>
#include <b>
~ » clang-format a.cpp
/* COPYRIGHT *\
\* (C) 2024 */
#include <b>
#include <a>
#include <b>
~ » cat b.cpp
/* COPYRIGHT *
* (C) 2024 */
#include <b>
#include <a>
#include <b>
~ » clang-format b.cpp
/* COPYRIGHT *
* (C) 2024 */
#include <a>
#include <b>