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 288 forks source link

Invalid boolean for attribute that takes enum #28

Closed haaakon closed 10 years ago

haaakon commented 10 years ago

YAML:11:35: error: invalid boolean AllowShortFunctionsOnASingleLine: Inline ^~

According to http://clang.llvm.org/docs/ClangFormatStyleOptions.html#clang-format-style-options AllowShortFunctionsOnASingleLine is defined as:

AllowShortFunctionsOnASingleLine (ShortFunctionStyle)
Dependent on the value, int f() { return 0; } can be put on a single line.

Possible values:

SFS_None (in configuration: None) Never merge functions into a single line.
SFS_Inline (in configuration: Inline) Only merge functions defined inside a class.
SFS_All (in configuration: All) Merge all functions fitting on a single line.

Seems to be some change in format maybe. Clang error says bool, but documentation says its an enum. Can't seem to find changelog, but might be the case the clang format binary has been updated?

travisjeffery commented 10 years ago

that's would've been configured incorrectly for as long as i know, the difference is that the plugin tells you now

haaakon commented 10 years ago

Ok looks like an upcoming feature in clang 3.5 anyway, though documentation is unclear about this.

haaakon commented 10 years ago

If you are interested i've compiled llvm 3.5 which i've confirmed fixes this bug. I can do a pull request with the new binary.

travisjeffery commented 10 years ago

ah i see what you're saying, i was thinking something else. don't worry about it, i'll upload a new version shortly.