[clang] [llvm] Add macro to suppress -Wunnecessary-virtual-specifier (PR #139614)
LLVM Continuous Integration via cfe-commits
cfe-commits at lists.llvm.org
Sat May 24 04:51:50 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-with-lto-ubuntu` running on `as-worker-91` while building `clang,llvm` at step 6 "build-stage1-compiler".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/49/builds/1544
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 6 (build-stage1-compiler) failure: build (failure)
0.019 [6494/72/1] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/AutoConvert.cpp.o
0.021 [6493/72/2] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/COM.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/COM.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/COM.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/COM.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/COM.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/COM.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/COM.h:17,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/COM.cpp:13:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
| ^
0.022 [6493/71/3] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ABIBreak.cpp.o
0.031 [6493/70/4] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ExtensibleRTTI.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ExtensibleRTTI.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ExtensibleRTTI.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/ExtensibleRTTI.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ExtensibleRTTI.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/ExtensibleRTTI.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/ExtensibleRTTI.h:63,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/ExtensibleRTTI.cpp:9:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
| ^
0.240 [6493/69/5] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DivisionByConstantInfo.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/DivisionByConstantInfo.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DivisionByConstantInfo.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DivisionByConstantInfo.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DivisionByConstantInfo.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/DivisionByConstantInfo.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/ADT/APInt.h:18,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/DivisionByConstantInfo.h:16,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/DivisionByConstantInfo.cpp:13:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
| ^
0.356 [6493/68/6] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BuryPointer.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/BuryPointer.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/BuryPointer.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/BuryPointer.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/BuryPointer.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/BuryPointer.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/BuryPointer.h:12,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/BuryPointer.cpp:9:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
| ^
0.385 [6493/67/7] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DeltaTree.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/DeltaTree.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/DeltaTree.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/DeltaTree.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/DeltaTree.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/DeltaTree.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/ADT/DeltaTree.h:16,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/DeltaTree.cpp:13:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
| ^
0.419 [6493/66/8] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.cpp.o
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/ConvertUTF.cpp
In file included from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/ConvertUTF.h:108,
from /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/lib/Support/ConvertUTF.cpp:64:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include/llvm/Support/Compiler.h:719:40: error: missing binary operator before token "("
719 | #if defined(__clang__) && __has_warning("-Wunnecessary-virtual-specifier")
```
</details>
https://github.com/llvm/llvm-project/pull/139614
More information about the cfe-commits
mailing list