[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-07 Thread Hans Wennborg via cfe-commits
zmodem wrote: > I think moving it to -Wextra may be a more palatable approach. What do others > think? Sounds good to me, and I think James makes a good argument. Does that actually help LLVM and libc++ though? I think at least LLVM does enable -Wextra. https://github.com/llvm/llvm-project/p

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @DKLoehr @AaronBallman Did you see the revert? Thank you for the ping, I did not see the revert. Thanks for catching that and sorry for the disruption! Given that this disrupts both LLVM and libc++, I think that's plenty of signal that "on by default" isn't really the be

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread James Y Knight via cfe-commits
jyknight wrote: Wait, _on by default_? Perhaps I'm out of line with current thinking here, but IMO, on-by-default should only diagnose things which are likely to be harmful -- NOT just a style or inefficiency issue, which seems to be all this is diagnosing. That LLVM's style conflicts with it

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-05 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: @DKLoehr @AaronBallman Did you see the revert? https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread James Y Knight via cfe-commits
jyknight wrote: LLVM's intentional usage is either to reduce redundant vtable emission via ensuring there is a key method, OR, to intentionally create a useless vtable, in order to reduce redundant debuginfo emission (it can be emitted only in the vtable's TU when there's a vtable.) I expect b

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/3933 Here is the relevant piece of the build

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Wait, _on by default_? > > Perhaps I'm out of line with current thinking here, but IMO, on-by-default > should only diagnose things which are likely to be harmful -- NOT just a > style or inefficiency issue, which seems to be all this is diagnosing. That > LLVM's style c

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/8938 Here is

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/7809 Here is the r

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-28 Thread Devon Loehr via cfe-commits
@@ -689,7 +689,7 @@ if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - append("-Werror=unguarded-availability-new" CMAKE_C_FL

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-28 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/133265 >From 792e1f3d062415134b8dfc4e8ed52f769f3e01f8 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 27 Mar 2025 14:59:44 + Subject: [PATCH 1/4] Enable by default --- clang/include/clang/Basic/DiagnosticGr

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-28 Thread Hans Wennborg via cfe-commits
@@ -689,7 +689,7 @@ if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - append("-Werror=unguarded-availability-new" CMAKE_C_FL

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
Sirraide wrote: > Ah, missed that, sorry. It seems there hasn't been a release since the > warning was added, and the existing release note seems to still apply: Ah, I thought it was an older warning. In that case we don’t need a release note https://github.com/llvm/llvm-project/pull/133265 __

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Ah, missed that, sorry. It seems there hasn't been a release since the warning was added, and the existing release note seems to still apply: https://github.com/llvm/llvm-project/blob/8bdcd0a96e65557c8c3bf506d186c49002db6463/clang/docs/ReleaseNotes.rst?plain=1#L291 https://githu

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr created https://github.com/llvm/llvm-project/pull/133265 This turns on the unnecessary-virtual-specifier warning in genera, but disables it when building LLVM. It also tweaks the warning description to be slightly more accurate. Background: I've been working on clea

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide commented: The release note is still missing. ut other than that this looks fine I think, but I’d say wait a few days before merging in case anyone else has any opinions as to whether this should be enabled by default or not. https://github.com/llvm/llvm-project/pul

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Ach, I was so focused on making the build work that I forgot to run tests... Fixed now, either by disabling the warning or adding it as expected, as seemed appropriate. https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits ma

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
https://github.com/Sirraide commented: Looks like you’ll have to update some tests because CI is failing (also, I’d be very surprised if we didn’t have tests for this). Also, this still needs a release note. Maybe a fix for the virtual anchor pattern would be to somehow not emit the warning f

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread Devon Loehr via cfe-commits
DKLoehr wrote: @zmodem Do you mind taking a look? https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Devon Loehr (DKLoehr) Changes This turns on the unnecessary-virtual-specifier warning in genera, but disables it when building LLVM. It also tweaks the warning description to be slightly more accurate. Background: I've been working on cl