diff options
author | Daniel Jasper <djasper@google.com> | 2014-07-09 07:50:33 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-07-09 07:50:33 +0000 |
commit | 4355e7f0effc788f1af2b48a531f650e1e40db39 (patch) | |
tree | ac6f8ba9d24bf11533cbc84e7031767f34422d7f /clang/lib/Format/Format.cpp | |
parent | 696b4a089cde5513973dc8e2cf17684d44e74aa5 (diff) | |
download | bcm5719-llvm-4355e7f0effc788f1af2b48a531f650e1e40db39.tar.gz bcm5719-llvm-4355e7f0effc788f1af2b48a531f650e1e40db39.zip |
clang-format: Revamp function declaration/definition indentation.
Key changes:
- Correctly (well ...) distinguish function declarations and variable
declarations with ()-initialization.
- Don't indent when breaking function declarations/definitions after the
return type.
- Indent variable declarations and typedefs when breaking after the
type.
This fixes llvm.org/PR17999.
llvm-svn: 212591
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 2ac5c9da0f9..a65f2e2ba2a 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -216,8 +216,6 @@ template <> struct MappingTraits<FormatStyle> { IO.mapOptional("TabWidth", Style.TabWidth); IO.mapOptional("UseTab", Style.UseTab); IO.mapOptional("BreakBeforeBraces", Style.BreakBeforeBraces); - IO.mapOptional("IndentFunctionDeclarationAfterType", - Style.IndentFunctionDeclarationAfterType); IO.mapOptional("SpacesInParentheses", Style.SpacesInParentheses); IO.mapOptional("SpacesInAngles", Style.SpacesInAngles); IO.mapOptional("SpaceInEmptyParentheses", Style.SpaceInEmptyParentheses); @@ -328,7 +326,6 @@ FormatStyle getLLVMStyle() { LLVMStyle.ForEachMacros.push_back("Q_FOREACH"); LLVMStyle.ForEachMacros.push_back("BOOST_FOREACH"); LLVMStyle.IndentCaseLabels = false; - LLVMStyle.IndentFunctionDeclarationAfterType = false; LLVMStyle.IndentWidth = 2; LLVMStyle.TabWidth = 8; LLVMStyle.MaxEmptyLinesToKeep = 1; @@ -373,7 +370,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true; GoogleStyle.DerivePointerAlignment = true; GoogleStyle.IndentCaseLabels = true; - GoogleStyle.IndentFunctionDeclarationAfterType = true; GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false; GoogleStyle.ObjCSpaceAfterProperty = false; GoogleStyle.ObjCSpaceBeforeProtocolList = false; |