aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Format/Format.h
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-14 16:24:39 +0000
committerDaniel Jasper <djasper@google.com>2013-01-14 16:24:39 +0000
commit6f5bb2c93c31a7977382c5079d85db8ca3267cd0 (patch)
treedaac9f82905181c4b2baa1fba3cd7a172776771a /include/clang/Format/Format.h
parentfd0ca976bd55167364ba1178e884d275cc6ef30b (diff)
Make single-line if statements optional.
Now, "if (a) return;" is only allowed, if this option is set. Also add a Chromium style which is currently identical to Google style except for this option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Format/Format.h')
-rw-r--r--include/clang/Format/Format.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h
index aac552b602..19c4c02f82 100644
--- a/include/clang/Format/Format.h
+++ b/include/clang/Format/Format.h
@@ -61,6 +61,9 @@ struct FormatStyle {
/// initializer on its own line.
bool ConstructorInitializerAllOnOneLineOrOnePerLine;
+ /// \brief If true, "if (a) return;" can be put on a single line.
+ bool AllowShortIfStatementsOnASingleLine;
+
/// \brief Add a space in front of an Objective-C protocol list, i.e. use
/// Foo <Protocol> instead of Foo<Protocol>.
bool ObjCSpaceBeforeProtocolList;
@@ -78,6 +81,10 @@ FormatStyle getLLVMStyle();
/// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml.
FormatStyle getGoogleStyle();
+/// \brief Returns a format style complying with Chromium's style guide:
+/// http://www.chromium.org/developers/coding-style.
+FormatStyle getChromiumStyle();
+
/// \brief Reformats the given \p Ranges in the token stream coming out of
/// \c Lex.
///