[llvm-bugs] [Bug 25200] New: clang-format strips new line on <<

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 15 13:08:42 PDT 2015


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

            Bug ID: 25200
           Summary: clang-format strips new line on <<
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: maic23 at live.de
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

Using
https://github.com/bitcoin/bitcoin/blob/2887bffcfdc138f53c60091ab2906790971c9af5/src/.clang-format


Steps to reproduce:

$ echo
"ICAgICBmcmllbmQgaW5saW5lIGNvbnN0IGJhc2VfdWludCBvcGVyYXRvci8oY29uc3QgYmFzZV91
aW50JiBhLCBjb25zdCBiYXNlX3VpbnQmIGIpIHsgcmV0dXJuIGJhc2VfdWludChhKSAvPSBiOyB9
CiAgICAgZnJpZW5kIGlubGluZSBjb25zdCBiYXNlX3VpbnQgb3BlcmF0b3J8KGNvbnN0IGJhc2Vf
dWludCYgYSwgY29uc3QgYmFzZV91aW50JiBiKSB7IHJldHVybiBiYXNlX3VpbnQoYSkgfD0gYjsg
fQogICAgIGZyaWVuZCBpbmxpbmUgY29uc3QgYmFzZV91aW50IG9wZXJhdG9yJihjb25zdCBiYXNl
X3VpbnQmIGEsIGNvbnN0IGJhc2VfdWludCYgYikgeyByZXR1cm4gYmFzZV91aW50KGEpICY9IGI7
IH0KICAgICBmcmllbmQgaW5saW5lIGNvbnN0IGJhc2VfdWludCBvcGVyYXRvcl4oY29uc3QgYmFz
ZV91aW50JiBhLCBjb25zdCBiYXNlX3VpbnQmIGIpIHsgcmV0dXJuIGJhc2VfdWludChhKSBePSBi
OyB9CiAgICAgZnJpZW5kIGlubGluZSBjb25zdCBiYXNlX3VpbnQgb3BlcmF0b3I+Pihjb25zdCBi
YXNlX3VpbnQmIGEsIGludCBzaGlmdCkgeyByZXR1cm4gYmFzZV91aW50KGEpID4+PSBzaGlmdDsg
fQogICAgIGZyaWVuZCBpbmxpbmUgY29uc3QgYmFzZV91aW50IG9wZXJhdG9yPDwoY29uc3QgYmFz
ZV91aW50JiBhLCBpbnQgc2hpZnQpIHsgcmV0dXJuIGJhc2VfdWludChhKSA8PD0gc2hpZnQ7IH0K
ICAgICBmcmllbmQgaW5saW5lIGNvbnN0IGJhc2VfdWludCBvcGVyYXRvciooY29uc3QgYmFzZV91
aW50JiBhLCB1aW50MzJfdCBiKSB7IHJldHVybiBiYXNlX3VpbnQoYSkgKj0gYjsgfQogICAgIGZy
aWVuZCBpbmxpbmUgYm9vbCBvcGVyYXRvcj09KGNvbnN0IGJhc2VfdWludCYgYSwgY29uc3QgYmFz
ZV91aW50JiBiKSB7IHJldHVybiBtZW1jbXAoYS5wbiwgYi5wbiwgc2l6ZW9mKGEucG4pKSA9PSAw
OyB9CiAgICAgZnJpZW5kIGlubGluZSBib29sIG9wZXJhdG9yPD0oY29uc3QgYmFzZV91aW50JiBh
LCBjb25zdCBiYXNlX3VpbnQmIGIpIHsgcmV0dXJuIGEuQ29tcGFyZVRvKGIpIDw9IDA7IH0KICAg
ICBmcmllbmQgaW5saW5lIGJvb2wgb3BlcmF0b3I9PShjb25zdCBiYXNlX3VpbnQmIGEsIHVpbnQ2
NF90IGIpIHsgcmV0dXJuIGEuRXF1YWxUbyhiKTsgfQogICAgIGZyaWVuZCBpbmxpbmUgYm9vbCBv
cGVyYXRvciE9KGNvbnN0IGJhc2VfdWludCYgYSwgdWludDY0X3QgYikgeyByZXR1cm4gIWEuRXF1
YWxUbyhiKTsgfQoK"| base64 --decode |clang-format -style=file

Gives me http://pastebin.ubuntu.com/12793334/ instead of not changing the
output.

-- 
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/20151015/554b1ee4/attachment.html>


More information about the llvm-bugs mailing list