[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; xiangzhai wrote: > v.g.vassilev wrote: > > Shouldn't the name be more generic. What this

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; v.g.vassilev wrote: > Shouldn't the name be more generic. What this essentially does is t

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-19 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: cfe/trunk/include/clang/Analysis/CloneDetection.h:324 +struct AutoGeneratedCloneConstraint { + StringRef IgnoredFilesPattern; Shouldn't the name be more generic. What this essentially does is to filter out false

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-18 Thread Leslie Zhai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305659: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler (authored by xiangzhai). Changed prior to commit: https://reviews.llvm.org/D31320?vs=102840&id=102984#toc Repository: rL LLVM ht

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-18 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. LGTM, thanks for the patch! Repository: rL LLVM https://reviews.llvm.org/D31320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-16 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 102840. xiangzhai added a comment. Dear Raphael, I updated my patch as you suggested, may I commit it? thanks! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D31320 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/Cl

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-16 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Dear Raphael, Sorry I am not available, I am looking after my little kid, see you next week, rebase perhaps. Thanks, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D31320 ___ cfe-commits mailing list cfe-co

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-16 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. Please check the last inline comment and then feel free to commit it with the suggested fix. And I wanted to wait for review on the other performance patches, so you can push this now.

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-16 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 102796. xiangzhai added a comment. Dear Raphael, I updated my patch as you suggested, please review it, thanks a lot! And I noticed that you are doing Performance optimizations for the CloneChecker https://reviews.llvm.org/D34182 I will rebase my patch if

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-16 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. See my inline comments about technical changes, but otherwise this looks ready to land. Please update and I'll give green light ASAP. Thanks! Comment at: lib/Analysis/CloneDetection.cpp:375 +const Decl *D = S.getContainingDecl(); +const Sourc

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-15 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 102777. xiangzhai added a comment. Herald added a subscriber: xazax.hun. Dear Raphael, Thanks for your suggestion! > Would it solve your use case if allow specifying file patterns via the > command line like this -analyzer-config Fixed! /home/zhaixian

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. I agree with Raphael. If you need to have more fine grained control over the translation unit (TU) I think we can have suppressing false positives via comments (@Noq would know more). Eg. // File.h defining moc_* yields a lot of false positives // alpha.clo

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-15 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor requested changes to this revision. teemperor added a comment. This revision now requires changes to proceed. Sorry for the delay, we got stuck because hard coding a certain file pattern into the clang source code doesn't seem to be a optimal solution (e.g. every user that has a differ

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-14 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Dear Anna, Long time no see, miss you :) > Should this revision be "abandoned" or is the plan to iterate on it? I wanna the plan to iterate on it, Artem reviewed the patch, and I fixed the issue as he suggested, ran `make check-clang-analysis` also used it for check

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Should this revision be "abandoned" or is the plan to iterate on it? Repository: rL LLVM https://reviews.llvm.org/D31320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-04-28 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Hi Vassil, The first one considered about CopyPaste dection Thanks for your reply! Let's do it together and Happy International Labor Day :) Regards, Leslie Zhai Repository: rL LLVM https://reviews

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-04-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In general, I think we should support such use-cases. It seems cleaner to me if we provide some sort of callbacks where the users can specify their custom false positive filters. I've discussed this in brief with Raphael and we were planning to write this up. Rep

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-04-28 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 97059. xiangzhai added a comment. Hi Artem, Thanks for your review! > Because LLVM's Illinois license is rather permissive than copyleft, we try to > avoid stuff copied from GPL/LGPL software (such as Qt or K3B) in our > codebase. The code doesn't seem t

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-04-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks! Because LLVM's Illinois license is rather permissive than copyleft, we try to avoid stuff copied from GPL/LGPL software (such as Qt or K3B) in our codebase. The code doesn't seem to have been copy-pasted from a copyleft project, but I guess it's better to rename the

[PATCH] D31320: [analyzer] Teach CloneDetection about Qt Meta-Object Compiler

2017-04-27 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 97047. xiangzhai added a subscriber: cfe-commits. xiangzhai added a comment. Hi Artem, Please review my updated patch, I use SourceManager's getFilename and add some testcases, thanks a lot! Regards, Leslie Zhai Repository: rL LLVM https://reviews.ll