[llvm-bugs] [Bug 48539] New: ReflowComments breaks Qt translation comments
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 17 04:19:32 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48539
Bug ID: 48539
Summary: ReflowComments breaks Qt translation comments
Product: clang
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: jvapen at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Qt has a concept of translation comments (see
https://doc.qt.io/qt-5/i18n-source-translation.html#translator-comments)
This gives extra meaning to //:, //=, //~.
This is a bit similar to doxygen using ///, ///<, //! or //!<
When reflown and a part of the comments are added on a new line, it should
repeat these extra characters as part of the comment token.
The reproduction:
.clang-format
=============
ColumnLimit: 40
ReflowComments: true
example.cpp
===========
//: This is a test. AAAAAAAAAA AAAAAAAAA AAAAAAAAAAAAAAA
QString example = tr("Example");
result.cpp
==========
//: This is a test. AAAAAAAAAA AAAAAAAAA
//AAAAAAAAAAAAAAA
QString example = tr("Example");
expected.cpp
============
//: This is a test. AAAAAAAAAA AAAAAAAAA
//: AAAAAAAAAAAAAAA
QString example = tr("Example");
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201217/de57f3c1/attachment.html>
More information about the llvm-bugs
mailing list