[llvm-bugs] [Bug 24355] New: clang-format handles whitespace for "f[](x) - 7" in unexpected way

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 5 00:10:48 PDT 2015


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

            Bug ID: 24355
           Summary: clang-format handles whitespace for "f[](x) - 7" in
                    unexpected way
           Product: new-bugs
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: andybohn at black-holes.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The incorrect behavior:
echo "f[](x) - 7" | clang-format
f[](x)-7


Similar expressions which seem to behave properly:
echo "f[]() - 7" | clang-format
f[]() - 7

echo "f[](1) - 7" | clang-format
f[](1) - 7

echo "f()[x] - 7" | clang-format
f()[x] - 7

echo "f()(x) - 7" | clang-format
f()(x) - 7

echo "f(x) - 7" | clang-format
f(x) - 7


My clang-format:
clang-format --version
Ubuntu clang-format version 3.6.0-2ubuntu1~trusty1 (tags/RELEASE_360/final)
(based on LLVM 3.6.0)


I have not yet tried newer versions of clang-format to see if this has been
fixed.  This seems to be incorrect behavior, but it's possible there's an
option to fix this.

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


More information about the llvm-bugs mailing list