[llvm-bugs] [Bug 24410] New: Short functions on a single line inside a namespace

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 10 03:38:27 PDT 2015


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

            Bug ID: 24410
           Summary: Short functions on a single line inside a namespace
           Product: clang
           Version: 3.6
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: skomik at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

I'm using the latest stable version of clang-format: 3.6.2

Settings: 

AllowShortFunctionsOnASingleLine: Inline
NamespaceIndentation: All

Expected formatting of non-inline method:

namespace Test
{
    float Foo::bar()
    {
        return m_bar;
    }
}

Observed formatting, the method is incorrectly considered inline:

namespace Test
{
    float Foo::bar() { return m_bar; }
}

If I set `NamespaceIndentation: None`, the method is no longer considered
inline:

namespace Test
{
float Foo::bar()
{
    return m_bar;
}
}

-- 
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/20150810/2c76a436/attachment.html>


More information about the llvm-bugs mailing list