forked from qt-creator/qt-creator
Silence the warning about missing initializer for member
Silence the following warning:
warning: missing initializer for member
‘clang::tooling::IncludeStyle::IncludeCategory::SortPriority’
[-Wmissing-field-initializers]
118 | style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200}};
According to the docs of IncludeCategories, the SortPriority field
is optional, and when not set its value is set to the value of
Priority field. So in order to fix the warning we repeat the same
value for SortPriority field.
In addition we ensure that we require at least clang version 10.0.0.
Change-Id: I8baae7a33ad1a7a7f3afe66779f482b29a7396b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -115,7 +115,7 @@ static clang::format::FormatStyle qtcStyle()
|
||||
style.ExperimentalAutoDetectBinPacking = false;
|
||||
style.FixNamespaceComments = true;
|
||||
style.ForEachMacros = {"forever", "foreach", "Q_FOREACH", "BOOST_FOREACH"};
|
||||
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200}};
|
||||
style.IncludeStyle.IncludeCategories = {{"^<Q.*", 200, 200}};
|
||||
style.IncludeStyle.IncludeIsMainRegex = "(Test)?$";
|
||||
style.IndentCaseLabels = false;
|
||||
style.IndentWidth = 4;
|
||||
|
||||
Reference in New Issue
Block a user