[clang] [clang-format] Add option to remove leading blank lines (PR #91221)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 21:14:10 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/566

Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4119/4647] Building CXX object tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/LoopConvertUtils.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4120/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/RIFF.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4121/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/YAMLGenerator.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4122/4647] Building CXX object tools/clang/tools/extra/clang-tidy/utils/CMakeFiles/obj.clangTidyUtils.dir/HeaderGuard.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4123/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o
FAILED: tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/tools/extra/clangd -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/tools/extra/clangd/../clang-tidy -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/pseudo/lib/../include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -MD -MT tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o -MF tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o.d -o tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/Format.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/Format.cpp:284:11: error: no member named 'KeepEmptyLinesAtTheStartOfBlocks' in 'clang::format::FormatStyle'
  284 |     Style.KeepEmptyLinesAtTheStartOfBlocks = true;
      |     ~~~~~ ^
1 error generated.
[4124/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/PathMapping.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4125/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4126/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ExpectedTypes.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4127/4647] Building CXX object tools/clang/tools/extra/include-cleaner/lib/CMakeFiles/obj.clangIncludeCleaner.dir/HTMLReport.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4128/4647] Building CXX object tools/clang/tools/extra/clang-tidy/readability/CMakeFiles/obj.clangTidyReadabilityModule.dir/SimplifyBooleanExprCheck.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4129/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/URI.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4130/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeCompletionStrings.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4131/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/JSONTransport.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4132/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/Serialize.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4133/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/CanonicalIncludes.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4134/4647] Building CXX object tools/clang/tools/extra/include-cleaner/lib/CMakeFiles/obj.clangIncludeCleaner.dir/Record.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4135/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/HeuristicResolver.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4136/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/find-all-symbols/CMakeFiles/obj.findAllSymbols.dir/PragmaCommentHandler.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4137/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/BitcodeReader.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4138/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/CMakeFiles/obj.clangIncludeFixer.dir/IncludeFixer.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4139/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ConfigCompile.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
Step 6 (build) failure: build (failure)
...
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4119/4647] Building CXX object tools/clang/tools/extra/clang-tidy/modernize/CMakeFiles/obj.clangTidyModernizeModule.dir/LoopConvertUtils.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4120/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/RIFF.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4121/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/YAMLGenerator.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4122/4647] Building CXX object tools/clang/tools/extra/clang-tidy/utils/CMakeFiles/obj.clangTidyUtils.dir/HeaderGuard.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4123/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o
FAILED: tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/tools/extra/clangd -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/../include-cleaner/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/tools/extra/clangd/../clang-tidy -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/tools/clang/include -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-qrcwx3za/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/pseudo/lib/../include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -no-canonical-prefixes -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -MD -MT tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o -MF tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o.d -o tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Format.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/Format.cpp
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang-tools-extra/clangd/Format.cpp:284:11: error: no member named 'KeepEmptyLinesAtTheStartOfBlocks' in 'clang::format::FormatStyle'
  284 |     Style.KeepEmptyLinesAtTheStartOfBlocks = true;
      |     ~~~~~ ^
1 error generated.
[4124/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/PathMapping.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4125/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4126/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ExpectedTypes.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4127/4647] Building CXX object tools/clang/tools/extra/include-cleaner/lib/CMakeFiles/obj.clangIncludeCleaner.dir/HTMLReport.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4128/4647] Building CXX object tools/clang/tools/extra/clang-tidy/readability/CMakeFiles/obj.clangTidyReadabilityModule.dir/SimplifyBooleanExprCheck.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4129/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/URI.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4130/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CodeCompletionStrings.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4131/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/JSONTransport.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4132/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/Serialize.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4133/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/index/CanonicalIncludes.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4134/4647] Building CXX object tools/clang/tools/extra/include-cleaner/lib/CMakeFiles/obj.clangIncludeCleaner.dir/Record.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4135/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/HeuristicResolver.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4136/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/find-all-symbols/CMakeFiles/obj.findAllSymbols.dir/PragmaCommentHandler.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4137/4647] Building CXX object tools/clang/tools/extra/clang-doc/CMakeFiles/obj.clangDoc.dir/BitcodeReader.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4138/4647] Building CXX object tools/clang/tools/extra/clang-include-fixer/CMakeFiles/obj.clangIncludeFixer.dir/IncludeFixer.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[4139/4647] Building CXX object tools/clang/tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/ConfigCompile.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]

```

https://github.com/llvm/llvm-project/pull/91221


More information about the cfe-commits mailing list