Re: [PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-08 Thread David Blaikie via cfe-commits
On Mon, Aug 8, 2016 at 8:37 AM Benjamin Kramer wrote: > -Wmissing-prototype only warns for functions, I want to catch classes > too. 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 pivot there. > Also f

Re: [PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-08 Thread Benjamin Kramer via cfe-commits
-Wmissing-prototype only warns for functions, I want to catch classes too. Also functions in the global namespace with a prototype are still badness in some coding styles. The limitation on definitions was to cut down on false positives, the current version of the patch doesn't have that limitation

Re: [PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-08 Thread David Blaikie via cfe-commits
This seems to have a lot of overlap with -Wmissing-prototype, really - what 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@lists.llvm.org> wrote: > Eugene.Zelenko added a subscriber: Eugene.Zelenko. > Eugene.Zel

Re: [PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-03 Thread Eugene Zelenko via cfe-commits
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@lists.llvm.org ht

[PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-03 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: alexfh. bkramer added a subscriber: cfe-commits. This is prone to ODR violations and generally frowned upon in many codebases (e.g. LLVM). The checker flags definitions, variables and classes in the global namespace. Common false positives l