[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 08:07:10 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang-tools-extra,clang` at step 5 "ninja check 1".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/4601
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (ninja check 1) failure: stage 1 checked (failure)
...
[10/419] Building CXX object tools/clang/tools/extra/include-cleaner/unittests/CMakeFiles/ClangIncludeCleanerTests.dir/AnalysisTest.cpp.o
[11/419] Building CXX object tools/clang/tools/extra/unittests/clang-apply-replacements/CMakeFiles/ClangApplyReplacementsTests.dir/ApplyReplacementsTest.cpp.o
[12/419] Linking CXX executable tools/clang/tools/extra/unittests/clang-apply-replacements/ClangApplyReplacementsTests
[13/419] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/BitcodeTest.cpp.o
[14/419] Building CXX object tools/clang/tools/extra/unittests/clang-change-namespace/CMakeFiles/ClangChangeNamespaceTests.dir/ChangeNamespaceTests.cpp.o
[15/419] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/Annotations.cpp.o
[16/419] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/GeneratorTest.cpp.o
[17/419] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/MDGeneratorTest.cpp.o
[18/419] Building CXX object tools/clang/tools/extra/unittests/clang-doc/CMakeFiles/ClangDocTests.dir/ClangDocTest.cpp.o
[19/419] Building CXX object tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
FAILED: tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o
/usr/local/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -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/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/unittests -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/../include-cleaner/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd/../clang-tidy -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/llvm/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd -I/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/clangd -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googletest/include -I/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/third-party/unittest/googlemock/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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -Wno-variadic-macros -Wno-gnu-zero-variadic-macro-arguments -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -MD -MT tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o -MF tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o.d -o tools/clang/tools/extra/clangd/unittests/CMakeFiles/ClangdTests.dir/ConfigCompileTests.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
../llvm/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp:308:9: error: no matching constructor for initialization of 'Diag' (aka 'clang::Diagnostic')
308 | Diag{&DiagEngine}, Conf.Diagnostics.Suppress, LangOptions()));
| ^ ~~~~~~~~~~~~~
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:1807:50: note: expanded from macro 'EXPECT_TRUE'
1807 | #define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
| ^~~~~~~~~
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:1792:23: note: expanded from macro 'GTEST_EXPECT_TRUE'
1792 | GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
| ^~~~~~~~~
../llvm/third-party/unittest/googletest/include/gtest/internal/gtest-internal.h:1493:38: note: expanded from macro 'GTEST_TEST_BOOLEAN_'
1493 | ::testing::AssertionResult(expression)) \
| ^~~~~~~~~~
../llvm/clang/include/clang/Basic/Diagnostic.h:1487:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'clang::DiagnosticsEngine *' to 'const Diagnostic' for 1st argument
1487 | class Diagnostic {
| ^~~~~~~~~~
../llvm/clang/include/clang/Basic/Diagnostic.h:1487:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'clang::DiagnosticsEngine *' to 'Diagnostic' for 1st argument
1487 | class Diagnostic {
| ^~~~~~~~~~
../llvm/clang/include/clang/Basic/Diagnostic.h:1496:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
1496 | Diagnostic(const DiagnosticsEngine *DO, const DiagnosticBuilder &DiagBuilder);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm/clang/include/clang/Basic/Diagnostic.h:1497:3: note: candidate constructor not viable: requires 5 arguments, but 1 was provided
1497 | Diagnostic(const DiagnosticsEngine *DO, SourceLocation DiagLoc,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1498 | unsigned DiagID, const DiagnosticStorage &DiagStorage,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1499 | StringRef StoredDiagMessage);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../llvm/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp:314:9: error: no matching constructor for initialization of 'Diag' (aka 'clang::Diagnostic')
314 | Diag{&DiagEngine}, Conf.Diagnostics.Suppress, LangOptions()));
| ^ ~~~~~~~~~~~~~
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:1811:52: note: expanded from macro 'EXPECT_FALSE'
1811 | #define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
| ^~~~~~~~~
../llvm/third-party/unittest/googletest/include/gtest/gtest.h:1795:25: note: expanded from macro 'GTEST_EXPECT_FALSE'
1795 | GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
| ^~~~~~~~~
```
</details>
https://github.com/llvm/llvm-project/pull/108187
More information about the cfe-commits
mailing list