[llvm-bugs] [Bug 36457] New: Wrong Output for AllowShortFunctionsOnASingleLine when ColumnLimit changes

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 20 08:00:30 PST 2018


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

            Bug ID: 36457
           Summary: Wrong Output for AllowShortFunctionsOnASingleLine when
                    ColumnLimit changes
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gnuetzi at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Formatting the file with the config below:
----------------
class A{
#ifndef ASD
        A<bool>& GetMask() { return a; }
        const A<bool>& GetMask() const { return a; }
#endif
};
----------------
results in weird behavior when:
ColumnLimit: 0
is changed to
ColumnLimit: 500
which should not make any difference.




ColumnLimit: 0
---------------
class A
{
#ifndef ASD
        A<bool>& GetMask()
        {
                return a;
        }
        const A<bool>& GetMask() const { return a; }
#endif
};
--------------


ColumnLimit: 500
-------------
class A
{
#ifndef ASD
        A<bool>& GetMask() { return a; }
        const A<bool>& GetMask() const { return a; }
#endif
};
------------

-- 
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/20180220/62777de9/attachment.html>


More information about the llvm-bugs mailing list