[PATCH] D23130: Add a check for definitions in the global namespace.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 8 08:55:58 PDT 2016
On Mon, Aug 8, 2016 at 8:37 AM Benjamin Kramer <benny.kra at gmail.com> wrote:
> -Wmissing-prototype only warns for functions, I want to catch classes
Ah, fair enough. Yeah, a clang-tidy check for things in the global
namespace that are in a main file rather than a header could be another
> Also functions in the global namespace with a prototype are still
> badness in some coding styles.
*nod* makes sense - especially in C++, where, as you say, you might want to
bless the extern "C" function declarations only.
> The limitation on definitions was to
> cut down on false positives, the current version of the patch doesn't
> have that limitation but I'm pondering on putting it back as there are
> too many false positives.
> On Mon, Aug 8, 2016 at 5:34 PM, David Blaikie <dblaikie at gmail.com> wrote:
> > This seems to have a lot of overlap with -Wmissing-prototype, really -
> > do you think of the overlap/distinction between the two?
> > On Wed, Aug 3, 2016 at 1:25 PM Eugene Zelenko via cfe-commits
> > <cfe-commits at lists.llvm.org> wrote:
> >> Eugene.Zelenko added a subscriber: Eugene.Zelenko.
> >> Eugene.Zelenko added a comment.
> >> Please mention this check in docs/ReleaseNotes.rst (in alphabetical
> >> order).
> >> https://reviews.llvm.org/D23130
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits