Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Wrong Output for AllowShortFunctionsOnASingleLine when ColumnLimit changes #35430

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR36457
Status NEW
Importance P enhancement
Reported by gabyx (gnuetzi@gmail.com)
Reported on 2018-02-20 08:00:30 -0800
Last modified on 2018-02-20 08:01:22 -0800
Version trunk
Hardware PC All
CC djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
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
};
------------
Quuxplusone commented 6 years ago

clang-format version 7.0.0 (trunk)