Coder Social home page Coder Social logo

"One liner" about clangformat-xcode HOT 9 CLOSED

neilyoung avatar neilyoung commented on May 18, 2024
"One liner"

from clangformat-xcode.

Comments (9)

tonyarnold avatar tonyarnold commented on May 18, 2024

I'd love to be wrong, but I don't think clang-format supports this at present: http://llvm.org/bugs/show_bug.cgi?id=18543

from clangformat-xcode.

tonyarnold avatar tonyarnold commented on May 18, 2024

I've submitted a patch to clang that should (hopefully) fix this: http://llvm.org/bugs/show_bug.cgi?id=18543#c3

from clangformat-xcode.

kdbdallas avatar kdbdallas commented on May 18, 2024

I see you then added a comment after your patch saying you "jumped the gun", so does that mean your patch doesn't fix it?

from clangformat-xcode.

tonyarnold avatar tonyarnold commented on May 18, 2024

It fixes plain old Objective-C method calls, but falls apart when it encounters blocks as method parameters. It's no worse than before (better, actually), but it's not "fixed". I've never written any C++ before last night, so I'm still wading through how this all works.

clang-format looks to have some pretty rigid edges at the moment, but I assume that's how all formatters work.

from clangformat-xcode.

fabiopelosin avatar fabiopelosin commented on May 18, 2024

I've submitted a patch to clang that should (hopefully) fix this: http://llvm.org/bugs/show_bug.cgi?id=18543#c3

@tonyarnold ๐Ÿค˜

from clangformat-xcode.

tonyarnold avatar tonyarnold commented on May 18, 2024

Don't get too excited โ€” if you read the thread, you'll see I've still got convincing to do. And I do so ever hate writing tests!

from clangformat-xcode.

tonyarnold avatar tonyarnold commented on May 18, 2024

OK, as of #35, setting ColumnLimit: 0 in your .clang-format will keep methods from spanning multiple lines.

from clangformat-xcode.

travisjeffery avatar travisjeffery commented on May 18, 2024

๐Ÿ‘

from clangformat-xcode.

fabiopelosin avatar fabiopelosin commented on May 18, 2024

๐Ÿค˜

from clangformat-xcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.