[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 07:45:29 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-aarch64-libcxx` running on `linaro-flang-aarch64-libcxx` while building `clang-tools-extra,clang` at step 5 "build-unified-tree".

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

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 5 (build-unified-tree) failure: build (failure)
...
296.332 [658/82/6445] Building CXX object tools/llvm-cfi-verify/lib/CMakeFiles/obj.LLVMCFIVerify.dir/FileAnalysis.cpp.o
296.347 [658/81/6446] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/llvm-cov.cpp.o
296.349 [658/80/6447] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/gcov.cpp.o
296.368 [658/79/6448] Building CXX object tools/clang/lib/Format/CMakeFiles/obj.clangFormat.dir/UnwrappedLineParser.cpp.o
296.371 [658/78/6449] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterJson.cpp.o
296.374 [658/77/6450] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CodeCoverage.cpp.o
296.384 [658/76/6451] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageFilters.cpp.o
296.386 [658/75/6452] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterLcov.cpp.o
296.393 [658/74/6453] Linking CXX shared library lib/libHLFIRDialect.so.20.0git
296.397 [658/73/6454] Building CXX object tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticPrinter.cpp.o
FAILED: tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticPrinter.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/tools/flang/lib/Frontend -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/flang/lib/Frontend -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/flang/include -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/tools/flang/include -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/include -I/home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/llvm/include -isystem /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/tools/mlir/include -isystem /home/tcwg-buildbot/worker/flang-aarch64-libcxx/build/tools/clang/include -isystem /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/llvm/../clang/include -stdlib=libc++ -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -fPIC  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticPrinter.cpp.o -MF tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticPrinter.cpp.o.d -o tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticPrinter.cpp.o -c /home/tcwg-buildbot/worker/flang-aarch64-libcxx/llvm-project/flang/lib/Frontend/TextDiagnosticPrinter.cpp
../llvm-project/flang/lib/Frontend/TextDiagnosticPrinter.cpp:48:49: error: no member named 'getFlagValue' in 'clang::DiagnosticsEngine'
   48 |     llvm::StringRef optValue = info.getDiags()->getFlagValue();
      |                                ~~~~~~~~~~~~~~~  ^
1 error generated.
296.399 [658/72/6455] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageSummaryInfo.cpp.o
296.401 [658/71/6456] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewHTML.cpp.o
296.403 [658/70/6457] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewText.cpp.o
296.405 [658/69/6458] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageView.cpp.o
296.408 [658/68/6459] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageReport.cpp.o
296.409 [658/67/6460] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/TestingSupport.cpp.o
296.675 [658/66/6461] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/RetainCountChecker/RetainCountChecker.cpp.o
296.690 [658/65/6462] Building CXX object tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnosticBuffer.cpp.o
296.730 [658/64/6463] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/OSObjectCStyleCast.cpp.o
296.900 [658/63/6464] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StdLibraryFunctionsChecker.cpp.o
297.193 [658/62/6465] Building CXX object tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/ShowEnabledWarnings.cpp.o
297.292 [658/61/6466] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/PointerIterationChecker.cpp.o
297.721 [658/60/6467] Linking CXX shared library lib/libFortranEvaluate.so.20.0git
297.812 [658/59/6468] Building CXX object tools/flang/lib/Frontend/CMakeFiles/flangFrontend.dir/TextDiagnostic.cpp.o
297.818 [658/58/6469] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/NumberObjectConversionChecker.cpp.o
297.941 [658/57/6470] Building CXX object tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/obj.clangHandleCXX.dir/handle_cxx.cpp.o
298.056 [658/56/6471] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/ARCMigrate.cpp.o
298.243 [658/55/6472] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexUSRs.cpp.o
298.612 [658/54/6473] Building CXX object tools/clang/tools/clang-diff/CMakeFiles/clang-diff.dir/ClangDiff.cpp.o
298.855 [658/53/6474] Building CXX object tools/clang/tools/clang-refactor/CMakeFiles/clang-refactor.dir/TestSupport.cpp.o
299.318 [658/52/6475] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXSourceLocation.cpp.o
299.372 [658/51/6476] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/Rewrite.cpp.o
299.553 [658/50/6477] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexInclusionStack.cpp.o
299.861 [658/49/6478] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/StreamChecker.cpp.o
299.966 [658/48/6479] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/DeadStoresChecker.cpp.o
299.991 [658/47/6480] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXString.cpp.o
300.071 [658/46/6481] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexHigh.cpp.o
300.366 [658/45/6482] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexDiagnostic.cpp.o
300.542 [658/44/6483] Building CXX object tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/CodeCompletion.cpp.o
300.627 [658/43/6484] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXStoredDiagnostic.cpp.o
300.640 [658/42/6485] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CXComment.cpp.o
301.175 [658/41/6486] Building CXX object tools/clang/lib/StaticAnalyzer/Checkers/CMakeFiles/obj.clangStaticAnalyzerCheckers.dir/PointerSortingChecker.cpp.o
301.188 [658/40/6487] Building CXX object tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/clang-import-test.cpp.o

```

</details>

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


More information about the cfe-commits mailing list