[llvm-bugs] [Bug 48751] New: Dont remove spaces around concatenation for macros

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 14 07:45:10 PST 2021


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

            Bug ID: 48751
           Summary: Dont remove spaces around concatenation for macros
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: barry.revzin at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Here's a common concatenation macro, e.g. from range-v3:

#define RANGES_CXX_FEATURE_CONCAT2(y, z) RANGES_CXX_ ## y ## _ ## z

This gets formatted as:

#define RANGES_CXX_FEATURE_CONCAT2(y, z) RANGES_CXX_##y##_##z

I'm not sure there's any option to control the spacing around the ##s, but this
is not easier to read.

-- 
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/20210114/a117b155/attachment.html>


More information about the llvm-bugs mailing list