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

            Bug ID: 33962
           Summary: clang-format unexpected token with "}" a comment block
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: patrick.st...@tomra.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

Created attachment 18858
  --> https://bugs.llvm.org/attachment.cgi?id=18858&action=edit
Used .clang-format configuration file

The following code causes an error in clang-format:

void f()
{
    if (true)
    {
        /*Hello*/}
}

The error message is: '5' is unexpected token. The expected token is '"' or ''.
Line2, position 66.

By moving the closing } to the next line, the error is gone:

void f()
{
    if (true)
    {
        /*Hello*/
    }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to