[llvm-bugs] [Bug 47589] New: clang-format-11: regression in aligned comments

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Sep 20 03:11:45 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47589

            Bug ID: 47589
           Summary: clang-format-11: regression in aligned comments
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sylvestre at debian.org
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
            Blocks: 46725

With this simple code:
----
namespace mozilla {

#define IPV6_SCOPE_GLOBAL 0      // Global scope.
#define IPV6_SCOPE_LINKLOCAL 1   // Link-local scope.
#define IPV6_SCOPE_SITELOCAL 2   // Site-local scope (deprecated).
#define IPV6_SCOPE_UNIQUELOCAL 3 // Unique local
#define IPV6_SCOPE_NODELOCAL 4   // Loopback

} // namespace mozilla
----

clang-format-10 left it intact

With clang-format-11, the output is:
----
% clang-format-11 IPv6Utils.h
namespace mozilla {

#define IPV6_SCOPE_GLOBAL 0 // Global scope.
#define IPV6_SCOPE_LINKLOCAL 1 // Link-local scope.
#define IPV6_SCOPE_SITELOCAL 2 // Site-local scope (deprecated).
#define IPV6_SCOPE_UNIQUELOCAL 3 // Unique local
#define IPV6_SCOPE_NODELOCAL 4 // Loopback

} // namespace mozilla
----

which is a significant regression for clang-format-11

Looking at the 11 release notes,
https://prereleases.llvm.org/11.0.0/rc2/tools/clang/docs/ReleaseNotes.html
I haven't seen anything directly related.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=46725
[Bug 46725] [meta] 11.0.0 Release Blockers
-- 
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/20200920/bada8b23/attachment.html>


More information about the llvm-bugs mailing list