r312468 - [analyzer] Increase minimum complexity filter of the CloneChecker.

2017-09-03 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Sep 3 22:56:36 2017 New Revision: 312468 URL: http://llvm.org/viewvc/llvm-project?rev=312468&view=rev Log: [analyzer] Increase minimum complexity filter of the CloneChecker. Summary: So far we used a value of 10 which was useful for testing but produces many false-po

r312440 - [analyzer] MinComplexityConstraint now early exits and only does one macro stack lookup

2017-09-03 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Sep 3 06:45:33 2017 New Revision: 312440 URL: http://llvm.org/viewvc/llvm-project?rev=312440&view=rev Log: [analyzer] MinComplexityConstraint now early exits and only does one macro stack lookup Summary: This patch contains performance improvements for the `MinComple

r312222 - [analyzer] Performance optimizations for the CloneChecker

2017-08-31 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Thu Aug 31 00:10:46 2017 New Revision: 31 URL: http://llvm.org/viewvc/llvm-project?rev=31&view=rev Log: [analyzer] Performance optimizations for the CloneChecker Summary: This patch aims at optimizing the CloneChecker for larger programs. Before this patch we took

r311991 - [modules] Add test for using declaration in classes.

2017-08-29 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Tue Aug 29 02:27:41 2017 New Revision: 311991 URL: http://llvm.org/viewvc/llvm-project?rev=311991&view=rev Log: [modules] Add test for using declaration in classes. Summary: This adds a test that checks if the using declaration in classes still works as intended with modu

r308340 - Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-07-18 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Tue Jul 18 11:52:58 2017 New Revision: 308340 URL: http://llvm.org/viewvc/llvm-project?rev=308340&view=rev Log: Add GCC's noexcept-type alias for c++1z-compat-mangling Summary: GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible with the GCC fla

r308333 - Don't set TUScope to null when generating a module in incremental processing mode.

2017-07-18 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Tue Jul 18 11:24:42 2017 New Revision: 308333 URL: http://llvm.org/viewvc/llvm-project?rev=308333&view=rev Log: Don't set TUScope to null when generating a module in incremental processing mode. Summary: When in incremental processing mode, we should never set `TUScope` t

r307509 - [analyzer] Faster hashing of subsequences in CompoundStmts.

2017-07-09 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Jul 9 14:14:36 2017 New Revision: 307509 URL: http://llvm.org/viewvc/llvm-project?rev=307509&view=rev Log: [analyzer] Faster hashing of subsequences in CompoundStmts. Summary: This patches improves the hashing subsequences in CompoundStmts by incrementally hashing al

r307501 - [analyzer] Make StmtDataCollector part of the CloneDetection API

2017-07-09 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Sun Jul 9 08:56:39 2017 New Revision: 307501 URL: http://llvm.org/viewvc/llvm-project?rev=307501&view=rev Log: [analyzer] Make StmtDataCollector part of the CloneDetection API Summary: We probably want to use this useful templates in other pieces of code (e.g. the one fr

Re: [PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Raphael Isemann via cfe-commits
I couldn't find a case where both gcc and clang agreed at the same time that they should emit this warning, but I think that's just bugs in the way we detect these cases. From the near-identical warning message I would say they both should emit warnings for the same cases (and probably will in the

r305878 - Changed wording in comment

2017-06-20 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Wed Jun 21 00:41:39 2017 New Revision: 305878 URL: http://llvm.org/viewvc/llvm-project?rev=305878&view=rev Log: Changed wording in comment Modified: cfe/trunk/lib/Analysis/CloneDetection.cpp Modified: cfe/trunk/lib/Analysis/CloneDetection.cpp URL: http://llvm.org/vie

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Raphael Isemann via cfe-commits
Thanks for the quick fix! 2017-05-18 21:48 GMT+02:00 Richard Smith : > I see, the problem is that template parameters are temporarily put in the > wrong DeclContext while the rest of the declaration is being parsed (and > thus end up temporarily owned by the wrong module). Fixed in r303373. > > On

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Raphael Isemann via cfe-commits
Hi, this is breaking our STL module builds. Can we revert this? We also have a minimal reproducer for our crash here http://teemperor.de/pub/stl_merging_issue.zip - Raphael 2017-05-17 2:24 GMT+02:00 Richard Smith via cfe-commits : > Author: rsmith > Date: Tue May 16 19:24:14 2017 > New Revision

[PATCH] D26742: [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator

2016-11-16 Thread Raphael Isemann via cfe-commits
teemperor added a reviewer: rsmith. teemperor added a comment. Looks good to me. I'll add Richard because he also merged/approved the original post-order patch. https://reviews.llvm.org/D26742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2016-11-13 Thread Raphael Isemann via cfe-commits
teemperor updated the summary for this revision. teemperor updated this revision to Diff 77759. teemperor added a comment. - Rebased patch to the current trunk state. - Replaced runtime polymorphism with templates. - Constraint interface now only has one method signature. https://reviews.llvm.or

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2016-11-13 Thread Raphael Isemann via cfe-commits
teemperor planned changes to this revision. teemperor added a comment. - I ran all real-world tests (sqlite, etc.) before rebasing to trunk. I'm not 100% confident that I correctly merged everything, so I'll rerun them just in case. The normal clang test-suite passes, so it looks good. https:/

[PATCH] D23780: [analyzer] Fixed crash in StmtDataCollector when analyzing methods of template classes.

2016-08-22 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ. teemperor added a subscriber: cfe-commits. The current check with `isTemplateInstantiation()` is also returning true when calling a member method of a template class. In this case getTemplateSpecializationArgs() retur

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-20 Thread Raphael Isemann via cfe-commits
teemperor marked an inline comment as done. teemperor added a comment. https://reviews.llvm.org/D22515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-20 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68778. teemperor added a comment. - Replaced hash_stream with MD5 in the sub-sequence code. https://reviews.llvm.org/D22515 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp lib/StaticAnalyzer/Checkers/CloneChecker.cpp

Re: [PATCH] D23316: [analyzer] Fixed the false-positives caused by macro generated code.

2016-08-19 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68684. teemperor added a comment. - Fixed typo. https://reviews.llvm.org/D23316 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/macro-complexity.cpp test/Analysis/copypaste/macros.cpp Index:

Re: [PATCH] D23555: [analyzer] CloneDetector now checks template arguments of function calls.

2016-08-19 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68683. teemperor marked an inline comment as done. https://reviews.llvm.org/D23555 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/call.cpp Index: test/Analysis/copypaste/call.cpp =

Re: [PATCH] D23555: [analyzer] CloneDetector now checks template arguments of function calls.

2016-08-19 Thread Raphael Isemann via cfe-commits
teemperor marked 3 inline comments as done. Comment at: lib/Analysis/CloneDetection.cpp:164 @@ +163,3 @@ +for (unsigned i = 0; i < Args->size(); ++i) { + Args->get(i).print(Context.getLangOpts(), OS); +} NoQ wrote: > We don't discriminate

Re: [PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2016-08-19 Thread Raphael Isemann via cfe-commits
teemperor retitled this revision from "[analyzer] Added a pass architecture to the CloneDetector" to "[analyzer] Added a reusable constraint system to the CloneDetector". teemperor updated the summary for this revision. teemperor updated this revision to Diff 68680. teemperor added a comment. -

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-18 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68632. teemperor added a comment. This revision is now accepted and ready to land. - Moved from hash_stream to LLVM's MD5 implementation. https://reviews.llvm.org/D22515 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp

Re: [PATCH] D23316: [analyzer] Fixed the false-positives caused by macro generated code.

2016-08-18 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68568. teemperor marked 2 inline comments as done. teemperor added a comment. - Added false-positives note for empty macros to the test suite. https://reviews.llvm.org/D23316 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.c

Re: [PATCH] D23316: [analyzer] Fixed the false-positives caused by macro generated code.

2016-08-18 Thread Raphael Isemann via cfe-commits
teemperor marked 10 inline comments as done. Comment at: lib/Analysis/CloneDetection.cpp:436 @@ +435,3 @@ +if (IsInMacro) { + Signature.Complexity = 0; +} NoQ wrote: > omtcyfz wrote: > > omtcyfz wrote: > > > omtcyfz wrote: > > > > NoQ wrote: > > > > >

Re: [PATCH] D23316: [analyzer] Fixed the false-positives caused by macro generated code.

2016-08-18 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68556. teemperor added a comment. - Added more documentation to the CloneSignature::Complexity field. - Macros now have a complexity value of 1 + sum(ChildComplexityValues). - Tests should be less cryptic now. https://reviews.llvm.org/D23316 Files: incl

Re: [PATCH] D23314: [analyzer] CloneDetector allows comparing clones for suspicious variable pattern errors.

2016-08-17 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68422. teemperor marked 11 inline comments as done. teemperor added a comment. - Made warning messages more 'clangish' as pointed out by Vassil (Thanks!) - Improved the class/variable names as pointed out by Artem (Thanks a lot!) - CloneChecker's functions a

Re: [PATCH] D23314: [analyzer] CloneDetector allows comparing clones for suspicious variable pattern errors.

2016-08-17 Thread Raphael Isemann via cfe-commits
teemperor added inline comments. Comment at: test/Analysis/copypaste/suspicious-clones.cpp:11 @@ +10,3 @@ +return a; + return b; // expected-note{{Suggestion is based on the useage of this variable in a similar piece of code.}} +} v.g.vassilev wrote: > This

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-16 Thread Raphael Isemann via cfe-commits
teemperor planned changes to this revision. teemperor added a comment. - As the hash_stream patch will take a while to land upstream, we will change this to use FoldingSetNodeID and change it to hash_stream once that landed. https://reviews.llvm.org/D22515 ___

[PATCH] D23555: [analyzer] CloneDetector now checks template arguments of function calls.

2016-08-16 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ. teemperor added a subscriber: cfe-commits. The CloneDetector currently ignores template arguments in function calls which leads to false-positive clones such as `isa(S)` and `isa(S)`. This patch adds functionality to

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-16 Thread Raphael Isemann via cfe-commits
teemperor marked 2 inline comments as done. teemperor added a comment. https://reviews.llvm.org/D22515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-16 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 68170. teemperor added a comment. - Renamed FoldingSetWrapper to FoldingSetNodeIDWrapper - Added missing // end anonymous namespace https://reviews.llvm.org/D22515 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp lib/St

Re: [PATCH] D23418: [analyzer] Added a pass architecture to the CloneDetector

2016-08-11 Thread Raphael Isemann via cfe-commits
teemperor planned changes to this revision. teemperor added a comment. - Add description - Make sure functions in CloneDetection.cpp are in a more logical order. https://reviews.llvm.org/D23418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D23418: [analyzer] Added a pass architecture to the CloneDetector

2016-08-11 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna. teemperor added a subscriber: cfe-commits. https://reviews.llvm.org/D23418 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp lib/StaticAnalyzer/Checkers/CloneChecker.cpp I

Re: [PATCH] D22515: [analyzer] Added custom hashing to the CloneDetector.

2016-08-11 Thread Raphael Isemann via cfe-commits
teemperor retitled this revision from "Added false-positive filter for unintended hash code collisions to the CloneDetector." to "[analyzer] Added custom hashing to the CloneDetector.". teemperor updated the summary for this revision. teemperor updated this revision to Diff 67715. teemperor added

Re: [PATCH] D22515: Added false-positive filter for unintended hash code collisions to the CloneDetector.

2016-08-11 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 67691. teemperor added a comment. - Rebased the patch to the newest code base. This patch is live again as it turned out that the CloneDetector can't handle large code bases without it. The simpler approach that we implemented instead consumed too much me

[PATCH] D23320: [analyzer] Fixed crash in CloneDetector in function calls.

2016-08-09 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna. teemperor added subscribers: cfe-commits, vsk. StmtDataCollector currently crashes on function calls because they don't have a callee. This patch fixes this. https://reviews.llvm.org/D23320 Files: lib/An

[PATCH] D23316: [analyzer] Fixed the false-positives caused by macro generated code.

2016-08-09 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna. teemperor added a subscriber: cfe-commits. So far macro-generated code was treated by the CloneDetector as normal code. This caused that some macros where reported as false-positive clones because their gen

[PATCH] D23314: [analyzer] CloneDetector allows comparing clones for suspicious variable pattern errors.

2016-08-09 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna. teemperor added subscribers: cfe-commits, vsk. One of the goals of the project was to find bugs caused by copy-pasting, which happen when a piece of code is copied but not all variables in this piece of cod

Re: [PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-08-04 Thread Raphael Isemann via cfe-commits
teemperor marked 3 inline comments as done. teemperor added a comment. I think the updated patch should no longer have the problems mentioned in the inline comments :) https://reviews.llvm.org/D22982 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-08-04 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 66839. teemperor marked 3 inline comments as done. teemperor added a comment. - Patch should no longer cause merge conflicts. - Improved comments and tests in functions.cpp. https://reviews.llvm.org/D22982 Files: lib/Analysis/CloneDetection.cpp test/A

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-08-01 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 66309. teemperor added a comment. - s/super class/base class/g https://reviews.llvm.org/D22514 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/asm.cpp test/Analysis/copypaste/attributes.cpp

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-08-01 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 66308. teemperor added a comment. - No longer re-initialize memory created from resize(). - Added test for checking that StmtDataCollector visits all parent classes. https://reviews.llvm.org/D22514 Files: include/clang/Analysis/CloneDetection.h lib/An

Re: [PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-07-31 Thread Raphael Isemann via cfe-commits
teemperor added a comment. I've deleted false-positives.cpp because all false-positives in there are now resolved and the test did no longer serve a purpose. We could leave the test file in there, but I think new false-positives either belong to an existing test category or deserve their own na

Re: [PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-07-31 Thread Raphael Isemann via cfe-commits
teemperor marked 2 inline comments as done. teemperor added a comment. https://reviews.llvm.org/D22982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-07-31 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 66262. teemperor added a comment. - Fixed a few typos in the comments. - Removed unnecessary `std::`. - Added the new tests to functions.cpp instead of their own file. https://reviews.llvm.org/D22982 Files: lib/Analysis/CloneDetection.cpp test/Analysi

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-31 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 66261. teemperor added a comment. - Added typedef for the contents of the data vector. - Fixed that StmtDataCollector isn't visiting all parent classes of a statement. - Removed 'test-' prefix from test files. - Fixed the other problems as pointed out by Art

[PATCH] D22982: [CloneDetector] No longer reporting clones that don't have a common referenced variable pattern.

2016-07-29 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, NoQ, zaks.anna. teemperor added a subscriber: cfe-commits. One of the current false-positives the CloneDetector produces is that the statements `a < b ? b` and `b < a ? b` are considered clones of each other, even though t

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-28 Thread Raphael Isemann via cfe-commits
teemperor marked an inline comment as done. Comment at: lib/Analysis/CloneDetection.cpp:134 @@ +133,3 @@ + DEF_ADD_DATA(Stmt, { addData(S->getStmtClass()); }) + DEF_ADD_DATA(Expr, { addData(S->getType()); }) + NoQ wrote: > I noticed something: with this patch, y

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-28 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65909. teemperor added a comment. - Actually removed the duplicate test now. https://reviews.llvm.org/D22514 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/false-positives.cpp test/Analysis/copypaste/functions.cpp test/Analysis/cop

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-27 Thread Raphael Isemann via cfe-commits
teemperor added a comment. Is there a specific situation/bug we want to test against with these tests? I looks to me as if they would mainly test against non-determinism (i.e. same statements have different data due to non-determinism). Comment at: lib/Analysis/CloneDetection.

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-27 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65857. teemperor marked 5 inline comments as done. teemperor added a comment. - Removed duplicate test case. https://reviews.llvm.org/D22514 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/false-positives.cpp test/Analysis/copypaste/f

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-27 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65854. teemperor added a comment. - Rebased patch. - Fixed code style (`const type` instead of `type const`). - Fixed missing const on some variables in StmtDataCollector. - Rewrote a few comments/variable names. https://reviews.llvm.org/D22514 Files: l

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-26 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65506. teemperor added a comment. - Now passing ChildSignatures by const reference. https://reviews.llvm.org/D20795 Files: include/clang/Analysis/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/Analysis/CMakeLists.txt lib/An

Re: [PATCH] D22515: Added false-positive filter for unintended hash code collisions to the CloneDetector.

2016-07-25 Thread Raphael Isemann via cfe-commits
teemperor added a comment. This patch is no longer needed because the CloneDetector from patch https://reviews.llvm.org/D20795 no longer uses custom hashing. https://reviews.llvm.org/D22515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-25 Thread Raphael Isemann via cfe-commits
teemperor marked 3 inline comments as done. teemperor added a comment. https://reviews.llvm.org/D20795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-25 Thread Raphael Isemann via cfe-commits
teemperor added inline comments. Comment at: lib/Analysis/CloneDetection.cpp:178 @@ +177,3 @@ + + bool VisitFunctionDecl(FunctionDecl *D) { +// If we found a function, we start the clone search on its body statement. NoQ wrote: > You'd probably want to add `O

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-25 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65441. teemperor added a comment. - The CloneGroup values in StringMap no longer store a copy of their own key. https://reviews.llvm.org/D20795 Files: include/clang/Analysis/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/Anal

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-25 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65439. teemperor marked 7 inline comments as done. teemperor added a comment. - Fixed the minor problems as pointed out by Artem. - Now using AnalysisConsumer instead of RecursiveASTVisitor. - Function names are now confirming to LLVM code-style. - Renamed D

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-24 Thread Raphael Isemann via cfe-commits
teemperor marked 9 inline comments as done. Comment at: include/clang/AST/CloneDetection.h:149 @@ +148,3 @@ +/// (e.g. function bodies). Other clones (e.g. cloned comments or declarations) +/// are not supported. +/// Put the idea on the future TODO list, but we p

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-24 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65291. teemperor added a comment. Ok, so I think I've addressed the points from last meeting in this patch: It was planned to replace custom hashing with FoldingSetNodeID and a hashmap: In this patch I removed all custom hashing. It's now done via LLVM's S

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-22 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 65086. teemperor added a comment. - StmtDataCollector is now using ConstStmtVisitor - Added tests for StmtDataCollector https://reviews.llvm.org/D22514 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/test-asm.cpp test/Analysis/copypas

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-21 Thread Raphael Isemann via cfe-commits
teemperor added a comment. Binary size increases from 33017160 Bytes to 33060464 Bytes (+40 KiB). I'm not sure if that's too much for such a minor feature, so I've added two new revisions: - One is the original patch with the other mentioned issues fixed (so, same +40 KiB size increase here).

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-21 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 64983. teemperor added a comment. - Replaced visitor-style utility functions with chained `if`s to reduce binary size. https://reviews.llvm.org/D22514 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/test-min-max.cpp Index: test/Analys

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-21 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 64982. teemperor marked 3 inline comments as done. teemperor added a comment. - Added `FIXME:` and removed duplicate "for example". https://reviews.llvm.org/D22514 Files: lib/Analysis/CloneDetection.cpp test/Analysis/copypaste/test-min-max.cpp Index:

Re: [PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-19 Thread Raphael Isemann via cfe-commits
teemperor planned changes to this revision. teemperor added a comment. - Expand test suite to test newly added code. https://reviews.llvm.org/D22514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D22514: CloneDetection now respects statement specific data when searching for clones.

2016-07-19 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, zaks.anna, NoQ. teemperor added a subscriber: cfe-commits. So far the CloneDetector only respected the class of each statement when searching for clones. This means that nodes that differentiate in any other attribute are

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-13 Thread Raphael Isemann via cfe-commits
teemperor added inline comments. Comment at: include/clang/AST/CloneDetection.h:131 @@ +130,3 @@ + bool operator<(const StmtSequence &Other) const { +return std::tie(S, StartIndex, EndIndex) < + std::tie(Other.S, Other.StartIndex, Other.EndIndex); z

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-13 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 63851. teemperor marked 18 inline comments as done. teemperor added a comment. - Checker is now in the alpha package and hidden. - MinGroupComplexity is now a parameter for the checker. - StmtData is now called CloneSignature. - Replaced the std::map inside

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-08 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 63266. teemperor added a comment. - StmtSequence is now treating all Stmt objects as const. http://reviews.llvm.org/D20795 Files: include/clang/AST/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/AST/CMakeLists.txt lib/AST/C

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-08 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 63262. teemperor marked 7 inline comments as done. http://reviews.llvm.org/D20795 Files: include/clang/AST/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/AST/CMakeLists.txt lib/AST/CloneDetection.cpp lib/StaticAnalyzer/Chec

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-07 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 63161. teemperor marked 5 inline comments as done. teemperor added a comment. - Fixed type of StmtSequence::iterator. http://reviews.llvm.org/D20795 Files: include/clang/AST/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/AST/

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-07 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 63159. teemperor added a comment. - Fixed the problems pointed out by Vassil (Thanks!) - Comments now have less line breaks. - Added more documentation to HashValue, it's hash function and the used prime numbers. - Added a typedef for StmtSequence::iterator

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-06 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 62899. teemperor added a comment. - Fixed a few typos in comments and documentation. http://reviews.llvm.org/D20795 Files: include/clang/AST/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/AST/CMakeLists.txt lib/AST/CloneDet

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-06 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 62888. teemperor added a comment. - Using doxygen-style comments for all private members. http://reviews.llvm.org/D20795 Files: include/clang/AST/CloneDetection.h include/clang/StaticAnalyzer/Checkers/Checkers.td lib/AST/CMakeLists.txt lib/AST/Clo

Re: [PATCH] D20795: Added basic capabilities to detect source code clones.

2016-07-06 Thread Raphael Isemann via cfe-commits
teemperor retitled this revision from "Added ASTStructure for analyzing the structure of Stmts." to "Added basic capabilities to detect source code clones.". teemperor updated the summary for this revision. teemperor updated this revision to Diff 62877. teemperor added a comment. - Patch now onl

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-27 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 62015. teemperor added a comment. - Stmt traversal is now always postorder, even if child statements don't support iterative traversal (thanks Richard). http://reviews.llvm.org/D20382 Files: include/clang/AST/RecursiveASTVisitor.h unittests/AST/CMake

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-17 Thread Raphael Isemann via cfe-commits
teemperor added a comment. ping http://reviews.llvm.org/D20382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-09 Thread Raphael Isemann via cfe-commits
teemperor added a comment. Agreed. The new patch is now reusing the Visit methods so that the executable size stays the same. The downside is that you can no longer create a Visitor that is both post- and preorder traversing, but I don't think there is any major use case for that. http://revie

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-09 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 60176. teemperor added a comment. Reduced executable size bloat. Made postorder and preorder mutually exclusive and postorder also uses the normal Visit* methods for callbacks. http://reviews.llvm.org/D20382 Files: include/clang/AST/RecursiveASTVisitor

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-03 Thread Raphael Isemann via cfe-commits
teemperor added a comment. The previous stats were wrong (only applied this patch, not the patch using the code): Release: 63311672 Byte -> 77212960 Byte (+22% or +13.8 MB) http://reviews.llvm.org/D20382 ___ cfe-commits mailing list cfe-commits@li

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-06-03 Thread Raphael Isemann via cfe-commits
teemperor added a comment. Size changes to clang's binary (build with clang): Release: 63367728 Byte -> 6326141 Byte (0.2% less, -106kB) Debug: 1239669408 Byte -> 1264216256 Byte (2% increase, +24.5 MB) http://reviews.llvm.org/D20382 ___ cfe-commi

[PATCH] D20795: Added ASTStructure for analyzing the structure of Stmts.

2016-05-30 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: v.g.vassilev, zaks.anna. teemperor added a subscriber: cfe-commits. The ASTStructure class generates data for performant searching Stmts with similar structure. http://reviews.llvm.org/D20795 Files: include/clang/AST/ASTStructure.h

Re: [PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-05-18 Thread Raphael Isemann via cfe-commits
teemperor added a comment. The motivation for this patch is a hashing algorithm for all AST nodes which reuses child hash values to be O(n) and therefore needs postorder support (think Java's Object.hashCode() but on AST nodes as an example). The full code that currently uses this feature can be

[PATCH] D20382: Add postorder support to RecursiveASTVisitor

2016-05-18 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: zaks.anna, v.g.vassilev, doug.gregor, chandlerc. teemperor added a subscriber: cfe-commits. This patch adds postorder traversal support to the RecursiveASTVisitor. This feature needs to be explicitly enabled by overriding shouldTraverse

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-30 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 55716. teemperor added a comment. Merged all tests into one file. http://reviews.llvm.org/D19312 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp test/SemaCXX/warn-undefined-in-ctor

[PATCH] D19721: Fix crash in BuildCXXDefaultInitExpr.

2016-04-29 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added reviewers: cfe-commits, rnk. Fix crash in BuildCXXDefaultInitExpr when member of template class has same name as the class itself. http://reviews.llvm.org/D19721 Files: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/pr27047-default-init-expr-name-c

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-27 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 55245. teemperor added a comment. - Added checks and tests for typeid - Moved warnings into same warning group - Check that only possibly evaluated expressions are checked http://reviews.llvm.org/D19312 Files: include/clang/Basic/DiagnosticGroups.td i

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-27 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 55189. teemperor added a comment. - Moved checks to the UninitializedFieldVisitor - Also check for dynamic_cast on this during construction http://reviews.llvm.org/D19312 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp tes

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-22 Thread Raphael Isemann via cfe-commits
teemperor marked 4 inline comments as done. teemperor added a comment. No, didn't saw the thread so far. I assume the comments in there are still valid, so I'll update this patch. Thanks for the feedback so far! http://reviews.llvm.org/D19312 ___ c

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-21 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 54464. teemperor added a comment. - Standard reference is now specifying what standard (C++11) - Added test based on the standard example - Also check base classes now for member calls (to pass the test from the standard example). http://reviews.llvm.org/

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-20 Thread Raphael Isemann via cfe-commits
teemperor added a comment. Oh, totally forgot that I also had a reference in the code, thanks! Will fix it ASAP. Adding the example from the standard to the test cases sounds good. It actually tests a few things that aren't covered by the current test. http://reviews.llvm.org/D19312 __

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-20 Thread Raphael Isemann via cfe-commits
teemperor updated this revision to Diff 54343. teemperor added a comment. - Fixed indentation http://reviews.llvm.org/D19312 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDeclCXX.cpp test/SemaCXX/ctor-init-with-member-call.cpp Index: test/SemaCXX/ctor-init-with-member-ca

[PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-20 Thread Raphael Isemann via cfe-commits
teemperor created this revision. teemperor added a reviewer: rsmith. teemperor added a subscriber: cfe-commits. According to [12.6.2 p16] calling member functions of the current class before all the base classes are initialized is undefined behavior. Some compilers (such as GCC 5.3 + ubsan)

<    1   2