aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-10-02 09:28:43 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-10-02 13:20:13 +0000
commit6ec8017bc675692f3d325c0cd95c9c4c7a79db7d (patch)
treeb41d4082711ad5d2ef5e68ba6d2d2ddfcbacb34e
parent1347515da604cacc675023be6d6b472532814a70 (diff)
Clang: Build against LLVM/Clang 9
Change-Id: I3608bca6541614bb55e67d35c87334957cd02761 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--src/plugins/clangformat/clangformatutils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
index 59c2b592d7..f087f77a94 100644
--- a/src/plugins/clangformat/clangformatutils.cpp
+++ b/src/plugins/clangformat/clangformatutils.cpp
@@ -60,7 +60,11 @@ static clang::format::FormatStyle qtcStyle()
style.AllowShortBlocksOnASingleLine = false;
style.AllowShortCaseLabelsOnASingleLine = false;
style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
+#if LLVM_VERSION_MAJOR >= 9
+ style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
+#else
style.AllowShortIfStatementsOnASingleLine = false;
+#endif
style.AllowShortLoopsOnASingleLine = false;
style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
style.AlwaysBreakBeforeMultilineStrings = false;