[llvm-bugs] [Bug 44345] New: Long namespace closing comment is duplicated endlessly
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 19 13:24:25 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44345
Bug ID: 44345
Summary: Long namespace closing comment is duplicated endlessly
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: ipherian at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Created attachment 22950
--> https://bugs.llvm.org/attachment.cgi?id=22950&action=edit
gif of the bug happening
For long namespace declarations, clang-format adds the comment at the close of
the namespace endlessly.
this code:
namespace
would::it::save::you::a::lot::of::time::if_::i::just::gave::up::and_::went::mad::now
{
void foo();
void bar();
}
gets turned into this, after a few formats:
namespace
would::it::save::you::a::lot::of::time::if_::i::just::gave::up::and_::
went::mad::now {
void foo();
void bar();
} // namespace
//
would::it::save::you::a::lot::of::time::if_::i::just::gave::up::and_::went::mad::now
//
would::it::save::you::a::lot::of::time::if_::i::just::gave::up::and_::went::mad::now
//
would::it::save::you::a::lot::of::time::if_::i::just::gave::up::and_::went::mad::now
...and it repeats forever.
details:
- using version 10.0.0-e20a1e486e1
https://github.com/llvm/llvm-project/commit/e20a1e486e1
- no special switches were added to clang-format, no .clang-format file present
- also occurs on 9.0.0 build for windows
expected behavior:
- only adds the end of namespace comment once
--
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/20191219/83613d51/attachment.html>
More information about the llvm-bugs
mailing list