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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs