Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Clement Courbet via cfe-commits
courbet added a comment. I can submit, thanks. https://reviews.llvm.org/D21992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. Looks good now. Do you need I submit for you? https://reviews.llvm.org/D21992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-22 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 65028. courbet marked an inline comment as done. https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-tidy/c

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-21 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. Is it in upstream yet? Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.h:19 @@ +18,3 @@ + +/// Flags slicing of member variables or vtable. See: +/// - courbet wrote: > Prazek wrote: > > some short description what does this check

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-20 Thread Clement Courbet via cfe-commits
courbet marked an inline comment as done. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.h:19 @@ +18,3 @@ + +/// Flags slicing of member variables or vtable. See: +/// - Prazek wrote: > some short description what does this check do? There is already a mo

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-20 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:30 @@ +29,3 @@ + // or + // - B does not define any additional members (either variables or + // overrides) wrt A. What is A and what is B? I guess you are missin

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-20 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 64642. courbet added a comment. rebase https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-tidy/cppcoregu

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-19 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the review. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:86 @@ +85,3 @@ + "slicing object from type %0 to %1 discards override %2") + << &DerivedDecl << &BaseDecl << Method; +} alexfh wrote:

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-19 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 64641. courbet marked an inline comment as done. courbet added a comment. cosmetics https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguide

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-19 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a nit. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:86 @@ +85,3 @@ + "slicing object from type %0 to %1 discards override %2") + << &De

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-18 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 64302. courbet marked 3 inline comments as done. courbet added a comment. Cosmetics. https://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguid

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-12 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:48 @@ +47,3 @@ + + // Assignement slicing: "a = b;" and "a = std::move(b);" variants. + const auto SlicesObjectInAssignment = courbet wrote: > hokein wrote: > > Looks like yo

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet added a comment. I've ran this check on llvm. There are 0 instances of virtual function slicing (which is not surprising since these usually result in actual bugs) and 71 instances of member varaible slicing: - 'FullSourceLoc' to 'SourceLocation': 57 - 'APSInt' to 'APInt': 5 - 'DeducedT

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet added a comment. Thanks for the comments. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:48 @@ +47,3 @@ + + // Assignement slicing: "a = b;" and "a = std::move(b);" variants. + const auto SlicesObjectInAssignment = hokein wrote: > Looks like

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 63477. courbet marked 4 inline comments as done. courbet added a comment. - Add a test case following comments. - Add more comments in tests. - Add examples in doc. - Simplify code a bit. http://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-11 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:48 @@ +47,3 @@ + + // Assignement slicing: "a = b;" and "a = std::move(b);" variants. + const auto SlicesObjectInAssignment = Looks like you are missing some cases here, like

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-07 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thanks for the new awesome check! Please run the check on LLVM and include your analysis of the results in the patch description. Another couple of comments below. Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:93 @@ +92,3 @@ + continue;

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-06 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 62845. courbet added a comment. Update release notes. http://reviews.llvm.org/D21992 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/SlicingCheck.cpp clang-

Re: [PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

2016-07-05 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). http://reviews.llvm.org/D21992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt