[all-commits] [llvm/llvm-project] 63de20: Reland "Add macro to suppress -Wunnecessary-virtua...
Devon Loehr via All-commits
all-commits at lists.llvm.org
Wed May 28 03:15:43 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 63de20c0de05ce7b8b3968a9d210aa0f3d01acd4
https://github.com/llvm/llvm-project/commit/63de20c0de05ce7b8b3968a9d210aa0f3d01acd4
Author: Devon Loehr <DKLoehr at users.noreply.github.com>
Date: 2025-05-28 (Wed, 28 May 2025)
Changed paths:
M clang/include/clang/AST/Decl.h
M clang/include/clang/AST/DeclCXX.h
M clang/include/clang/AST/DeclFriend.h
M clang/include/clang/AST/DeclOpenMP.h
M clang/include/clang/Driver/Action.h
M clang/include/clang/Sema/Sema.h
M clang/lib/AST/ByteCode/InterpFrame.h
M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
M clang/lib/CodeGen/CGStmtOpenMP.cpp
M clang/lib/Driver/ToolChains/Hexagon.h
M llvm/cmake/modules/HandleLLVMOptions.cmake
M llvm/include/llvm/Analysis/InstSimplifyFolder.h
M llvm/include/llvm/Analysis/TargetFolder.h
M llvm/include/llvm/IR/ConstantFolder.h
M llvm/include/llvm/IR/NoFolder.h
M llvm/include/llvm/Support/Compiler.h
M llvm/include/llvm/Transforms/Scalar/GVNExpression.h
M llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
M llvm/lib/Target/X86/X86InstrInfo.h
Log Message:
-----------
Reland "Add macro to suppress -Wunnecessary-virtual-specifier" (#141091)
This fixes #139614 on non-clang compilers by moving `__has_warning`
completely inside the `#if defined(__clang__)` block. This prevents a
parse failure from compilers which don't recognize `__has_warning`.
Original description:
Followup to #138741.
This adds the requested macro to silence
`-Wunnecessary-virtual-specifier` when declaring virtual anchor
functions in `final` classes, per [LLVM
policy](https://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers).
It also cleans up any remaining instances of the warning, allowing us to
stop disabling it when we build LLVM.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list