forked from qt-creator/qt-creator
clang-format: Adapt to LLVM 16
Change-Id: I2e35f92db6de10b1e4bf173f0864f0cd893a011f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Björn Schäpers
parent
ed33e2bfb5
commit
f4545807de
@@ -39,7 +39,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
|
|||||||
|
|
||||||
// This is a separate pass, don't do it unless it's the full formatting.
|
// This is a separate pass, don't do it unless it's the full formatting.
|
||||||
style.FixNamespaceComments = false;
|
style.FixNamespaceComments = false;
|
||||||
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
|
style.AlignTrailingComments = {clang::format::FormatStyle::TCAS_Never, 0};
|
||||||
|
#else
|
||||||
style.AlignTrailingComments = false;
|
style.AlignTrailingComments = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
|
if (replacementsToKeep == ReplacementsToKeep::IndentAndBefore)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -49,7 +49,11 @@ clang::format::FormatStyle qtcStyle()
|
|||||||
#else
|
#else
|
||||||
style.AlignOperands = true;
|
style.AlignOperands = true;
|
||||||
#endif
|
#endif
|
||||||
|
#if LLVM_VERSION_MAJOR >= 16
|
||||||
|
style.AlignTrailingComments = {FormatStyle::TCAS_Always, 0};
|
||||||
|
#else
|
||||||
style.AlignTrailingComments = true;
|
style.AlignTrailingComments = true;
|
||||||
|
#endif
|
||||||
style.AllowAllParametersOfDeclarationOnNextLine = true;
|
style.AllowAllParametersOfDeclarationOnNextLine = true;
|
||||||
#if LLVM_VERSION_MAJOR >= 10
|
#if LLVM_VERSION_MAJOR >= 10
|
||||||
style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
|
style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
|
||||||
|
|||||||
Reference in New Issue
Block a user