Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:7 @@ +6,3 @@ + +extern int ExternGlobal; +static int GlobalScopeBadInit1 = ExternGlobal; alexfh wrote: > What happens if you add: > > extern int

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-08 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52999. courbet added a comment. Add unit test for multiple declaration then definition. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52688. courbet added a comment. Update naming to be constistent with the standard: use "non-local" instead of "global" (or "static" in my case, as I started from classes and the name stuck). http://reviews.llvm.org/D18649 Files:

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52684. courbet added a comment. Fix 5 of the 8 false positives. Add tests. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#391001, @alexfh wrote: > In http://reviews.llvm.org/D18649#390862, @courbet wrote: > > > In http://reviews.llvm.org/D18649#389363, @alexfh wrote: > > > > > Thank you for working on the new clang-tidy check! > > > > > > We usually

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52541. courbet marked 2 inline comments as done. courbet added a comment. cosmetics + more documentation http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-interfaces-global-init.rst:7 @@ +6,3 @@ +This check flags initializers of globals that access extern objects, +and therefore can lead to order-of-initialization problems. +

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-04 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#389363, @alexfh wrote: > Thank you for working on the new clang-tidy check! > > We usually recommend authors to run their checks on a large code base to > ensure it doesn't crash and doesn't generate obvious false positives. It > would

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52370. courbet marked 3 inline comments as done. courbet added a comment. Constness + typos. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a subscriber: etienneb. courbet added a comment. Looks like there's a race condition in phabricator. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:37 @@ +36,3 @@ +static int FromClassBadInit = takesInt(A::ClassScope); +// CHECK-MESSAGES:

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet removed a subscriber: etienneb. courbet updated this revision to Diff 52366. courbet marked 2 inline comments as done. courbet added a comment. Style fixes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#388337, @Eugene.Zelenko wrote: > Please mention new check in docs/ReleaseNotes.rst. That should be in a different commit, right ? Release notes are in a different repo (forgive my ignorance, this is my first patch).

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52353. courbet added a comment. Updated release notes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-03-31 Thread Clement Courbet via cfe-commits
courbet added a comment. ping ? http://reviews.llvm.org/D18442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-03-31 Thread Clement Courbet via cfe-commits
courbet created this revision. courbet added a reviewer: alexfh. courbet added a subscriber: cfe-commits. This check flags initializers of globals that access extern objects, and therefore can lead to order-of-initialization problems (this recommandation is part of CPP core guidelines). Note

<    1   2   3