[llvm-bugs] [Bug 26650] New: clang-format treats multiplication as pointer dereference

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 17 05:06:44 PST 2016


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

            Bug ID: 26650
           Summary: clang-format treats multiplication as pointer
                    dereference
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: charles.r.hogg at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

Consider the following code:

    a=b*c;

clang-format correctly renders it as follows:

    a = b * c;

However, this breaks if a is a pointer which we must dereference:

    *a=b*c;

clang-format now renders this as:

    *a = b *c;

Note that it thinks we are dereferencing c, instead of multiplying by it!

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


More information about the llvm-bugs mailing list