[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 27 16:33:20 PST 2020


Eugene.Zelenko added a comment.

In D73413#1843368 <https://reviews.llvm.org/D73413#1843368>, @njames93 wrote:

> In D73413#1843103 <https://reviews.llvm.org/D73413#1843103>, @alexfh wrote:
>
> > How is this different from `-Wmissing-prototypes`?
>
>
> This checks variables too, and it looks for a prototype specifically in the header files. missing-prototypes just ensures there is a prototype of a function before its defined. It also checks based on linkage of the function/variable


I observed a lot of cases when people cheated GCC  `-Wmissing-prototypes` by adding prototypes in source file instead of header.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73413





More information about the cfe-commits mailing list