Issue 166911
Summary The tail "\" is added in the C++ code
Labels new issue
Assignees
Reporter QI1002
    Hi 

I have the C++ code like below: (Two "//" in the same column)

#include <stdio.h>
int main(void) {
#if TEMP
    for (size_t index = 0; index < 10; ++index) {
 printf("hello world");
    }
#endif  // TEMP
        //
    return 0;
}

After running clang-format, it will output the extra "\" char in the end of line of the first "//"

#endif  // TEMP \

It will cause the compiler error if I build them by the command "gcc -Werror=comment test.cc".
I found the issue occur in llvm 21.1.0 or 17.00. 
Do you have some options to avoid it before the fix ?  

Regards
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to