[PATCH] D101566: Let -Wweak-template-vtables warn on implicit instantiations

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 27 10:39:27 PDT 2021


dblaikie added a comment.

In D101566#2785190 <https://reviews.llvm.org/D101566#2785190>, @aaronpuchert wrote:

> In D101566#2734948 <https://reviews.llvm.org/D101566#2734948>, @dblaikie wrote:
>
>> Makes it hard to justify the complexity in the compiler if it's hard to justify/support the value of the warning.
>
> The complexity for `-Wweak-template-vtables` is just 10 lines of code. We're just using information that's already there.
>
>> I believe it's compile time/build time, yes - but yeah, it's pretty questionable/suspect. LLVM's the only project I know of with it as a coding convention/guideline/rule - and even we haven't even remotely tried to enforce it. (& when I did do a bit of work to add more key functions people reasonably questioned the value of them - and I didn't really have data to support it, I could only point to the fact that I was implementing the stated policy/style guide)
>
> Just to make sure I got this right, you're suggesting to remove both warnings?

Right - to remove -Wweak-template-vtable in its entirety. The original implementation explicitly didn't warn on implicit instantiations and I think the fact that it warned on explicit instantiations is more bug than feature - and we should treat it that way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101566/new/

https://reviews.llvm.org/D101566



More information about the cfe-commits mailing list