Skip to content

-Wmissing-declarations is not implemented to mean what GCC means #16660

@llvmbot

Description

@llvmbot
Bugzilla Link 16286
Version unspecified
OS Linux
Attachments basic test case for both warnings
Reporter LLVM Bugzilla Contributor
CC @dwblaikie

Extended Description

Even more than the still-unfixed bug #​4803, I find -Wmissing-declarations essential in C++ to make accidental parameter mismatches compiler errors rather than linker errors.

However, -Wmissing-declarations seems to be used for something else, as in bug #​10830.

Additionally, you could emit better warnings than GCC if, when emitting the warning for -Wmissing-declarations, you also emit the location of any declarations this definition is overloading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions