diff options
| author | Daniel Jasper <djasper@google.com> | 2014-01-28 15:20:33 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-01-28 15:20:33 +0000 |
| commit | 418b2b414b98d5fbbdb5069811422ea2d6ffef3c (patch) | |
| tree | 01aca160c7c933be86f236bf202465841273a5dd /lib/Format/Format.cpp | |
| parent | e1978b80258c81a6d398533dfed4da50d9c09c0b (diff) | |
| download | clang-418b2b414b98d5fbbdb5069811422ea2d6ffef3c.tar.gz clang-418b2b414b98d5fbbdb5069811422ea2d6ffef3c.tar.bz2 clang-418b2b414b98d5fbbdb5069811422ea2d6ffef3c.tar.xz | |
clang-format: Add support for a space after @property
Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.
Change by Christian Legnitto. Thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
| -rw-r--r-- | lib/Format/Format.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index f715ce2810..1eca6cf79c 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -164,6 +164,7 @@ template <> struct MappingTraits<FormatStyle> { IO.mapOptional("IndentCaseLabels", Style.IndentCaseLabels); IO.mapOptional("MaxEmptyLinesToKeep", Style.MaxEmptyLinesToKeep); IO.mapOptional("NamespaceIndentation", Style.NamespaceIndentation); + IO.mapOptional("ObjCSpaceAfterProperty", Style.ObjCSpaceAfterProperty); IO.mapOptional("ObjCSpaceBeforeProtocolList", Style.ObjCSpaceBeforeProtocolList); IO.mapOptional("PenaltyBreakBeforeFirstCallParameter", @@ -267,6 +268,7 @@ FormatStyle getLLVMStyle() { LLVMStyle.TabWidth = 8; LLVMStyle.MaxEmptyLinesToKeep = 1; LLVMStyle.NamespaceIndentation = FormatStyle::NI_None; + LLVMStyle.ObjCSpaceAfterProperty = false; LLVMStyle.ObjCSpaceBeforeProtocolList = true; LLVMStyle.PointerBindsToType = false; LLVMStyle.SpacesBeforeTrailingComments = 1; @@ -305,6 +307,7 @@ FormatStyle getGoogleStyle() { GoogleStyle.DerivePointerBinding = true; GoogleStyle.IndentCaseLabels = true; GoogleStyle.IndentFunctionDeclarationAfterType = true; + GoogleStyle.ObjCSpaceAfterProperty = false; GoogleStyle.ObjCSpaceBeforeProtocolList = false; GoogleStyle.PointerBindsToType = true; GoogleStyle.SpacesBeforeTrailingComments = 2; @@ -349,6 +352,7 @@ FormatStyle getMozillaStyle() { MozillaStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true; MozillaStyle.DerivePointerBinding = true; MozillaStyle.IndentCaseLabels = true; + MozillaStyle.ObjCSpaceAfterProperty = true; MozillaStyle.ObjCSpaceBeforeProtocolList = false; MozillaStyle.PenaltyReturnTypeOnItsOwnLine = 200; MozillaStyle.PointerBindsToType = true; @@ -365,6 +369,7 @@ FormatStyle getWebKitStyle() { Style.ColumnLimit = 0; Style.IndentWidth = 4; Style.NamespaceIndentation = FormatStyle::NI_Inner; + Style.ObjCSpaceAfterProperty = true; Style.PointerBindsToType = true; return Style; } |
