travisjeffery / ClangFormat-Xcode

Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
https://twitter.com/travisjeffery
MIT License
2.89k stars 287 forks source link

Crashes on single-line conditionals without braces #5

Closed fictorial closed 10 years ago

fictorial commented 10 years ago

No crash

if ([UIFont respondsToSelector:@selector(preferredFontForTextStyle:)]) {
    return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
  }

Crash

if ([UIFont respondsToSelector:@selector(preferredFontForTextStyle:)])
    return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
fictorial commented 10 years ago

Hmm, but then I changed the format from LLVM to Google... No crash. And, back to LLVM and no more crashes... Odd.