Skip to content

[RFE] Provide warning for C++ class without anchor method #21493

Open
@llvmbot

Description

@llvmbot
Bugzilla Link 21119
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

LLVM's style guide requires classes with vtables to have an out-of-line anchor method (even it requires defining an unused synthetic one).

It would be nice if Clang had a warning to identify C++ classes without a vtable anchor. To reduce noise, it might make sense to limit this to classes with at least one out-of-line method, and then only fire the diagnostic when an implementation of that method is seen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions