summaryrefslogtreecommitdiff
path: root/src/plugins/clangformat/clangformatutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clangformat/clangformatutils.cpp')
-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;