diff options
Diffstat (limited to 'src/plugins/clangformat/clangformatbaseindenter.cpp')
-rw-r--r-- | src/plugins/clangformat/clangformatbaseindenter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp index 1d5dc2730c..b491bd293f 100644 --- a/src/plugins/clangformat/clangformatbaseindenter.cpp +++ b/src/plugins/clangformat/clangformatbaseindenter.cpp @@ -65,7 +65,11 @@ static void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style, static llvm::StringRef clearExtraNewline(llvm::StringRef text) { +#if LLVM_VERSION_MAJOR >= 16 + while (text.starts_with("\n\n")) +#else while (text.startswith("\n\n")) +#endif text = text.drop_front(); return text; } |