aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangformat
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-07-12 12:03:26 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-07-12 15:24:59 +0000
commit264fa85f506f58e9cfc6a5a7ebe7c17b9db22494 (patch)
tree308d2a052337279324d70cab82f62b027db60d4e /src/plugins/clangformat
parent1936006a9134a383a04b32ea94ecc1f152278eac (diff)
Fix a number of compiler warnings
Change-Id: I3e71bffb2099d896742a6fca77febe20e2076464 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/clangformat')
-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 3905ae5f6a5..816dc09650b 100644
--- a/src/plugins/clangformat/clangformatutils.cpp
+++ b/src/plugins/clangformat/clangformatutils.cpp
@@ -120,7 +120,11 @@ static clang::format::FormatStyle qtcStyle()
style.ExperimentalAutoDetectBinPacking = false;
style.FixNamespaceComments = true;
style.ForEachMacros = {"forever", "foreach", "Q_FOREACH", "BOOST_FOREACH"};
+#if LLVM_VERSION_MAJOR >= 12
+ style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200, true}};
+#else
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200}};
+#endif
style.IncludeStyle.IncludeIsMainRegex = "(Test)?$";
style.IndentCaseLabels = false;
style.IndentWidth = 4;