[llvm-bugs] [Bug 48750] New: Preceding preprocessor in function declaration causes weird function declaration formatting

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 14 07:11:28 PST 2021


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

            Bug ID: 48750
           Summary: Preceding preprocessor in function declaration causes
                    weird function declaration formatting
           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

$ cat .clang-format 
BasedOnStyle: Google

$ cat wat.h
#ifdef some_constexpr_macro
constexpr
#endif
int f(int);

$ clang-format wat.h
#ifdef some_constexpr_macro
constexpr
#endif
    int
    f(int);

Not sure why this is being indented, but it shouldn't be.

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


More information about the llvm-bugs mailing list