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

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:

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.

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 ___

[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-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-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

[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

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

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

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

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

[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)

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:

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-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).

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

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

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

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

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 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

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

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

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

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:

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

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,

[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

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

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

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

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] 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] 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

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

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:

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

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:

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

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

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

[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

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 ) const { +return std::tie(S, StartIndex, EndIndex) < + std::tie(Other.S, Other.StartIndex, Other.EndIndex);

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] 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

[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-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

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

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

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

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

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

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

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

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

[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

[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:

[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

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

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

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-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] 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] 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] 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] 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

[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 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

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] 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] 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:

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

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: > > > >

[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()

[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

[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.

[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.

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=rev Log: [analyzer] Faster hashing of subsequences in CompoundStmts. Summary: This patches improves the hashing subsequences in CompoundStmts by incrementally hashing all

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=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 from

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=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` to a

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=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 flags.

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=rev Log: Changed wording in comment Modified: cfe/trunk/lib/Analysis/CloneDetection.cpp Modified: cfe/trunk/lib/Analysis/CloneDetection.cpp URL:

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

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

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).

r313049 - Use the VFS from the CompilerInvocation by default

2017-09-12 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Tue Sep 12 09:54:53 2017 New Revision: 313049 URL: http://llvm.org/viewvc/llvm-project?rev=313049=rev Log: Use the VFS from the CompilerInvocation by default Summary: The CompilerInstance should create its default VFS from its CompilerInvocation. Right now the user has

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=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 modules.

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=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

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=rev Log: [analyzer] MinComplexityConstraint now early exits and only does one macro stack lookup Summary: This patch contains performance improvements for the

r312533 - [Bash-autocomplete] Fix crash when invoking --autocomplete without value.

2017-09-05 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Tue Sep 5 05:41:00 2017 New Revision: 312533 URL: http://llvm.org/viewvc/llvm-project?rev=312533=rev Log: [Bash-autocomplete] Fix crash when invoking --autocomplete without value. Summary: Currently clang segfaults when invoked with `clang --autocomplete=`. This patch

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=rev Log: [analyzer] Performance optimizations for the CloneChecker Summary: This patch aims at optimizing the CloneChecker for larger programs. Before this patch we took

r331021 - Make MultiplexASTDeserializationListener part of the API [NFC]

2018-04-27 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Fri Apr 27 00:05:40 2018 New Revision: 331021 URL: http://llvm.org/viewvc/llvm-project?rev=331021=rev Log: Make MultiplexASTDeserializationListener part of the API [NFC] Summary: This patch moves the MultiplexASTDeserializationListener declaration into a public header.

r332913 - Add missing include for cstdint to Visibility.h

2018-05-21 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon May 21 15:27:22 2018 New Revision: 332913 URL: http://llvm.org/viewvc/llvm-project?rev=332913=rev Log: Add missing include for cstdint to Visibility.h Summary: We use uint8_t in this header, so we need to include cstdint. Subscribers: cfe-commits Differential

r333123 - [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual

2018-05-23 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Wed May 23 13:59:46 2018 New Revision: 333123 URL: http://llvm.org/viewvc/llvm-project?rev=333123=rev Log: [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textual Summary: Since clang r332929 these two headers throw errors when included from somewhere else than

r333069 - Fix unaligned memory access when reading INPUT_FILE_OFFSETS data

2018-05-23 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Wed May 23 02:02:40 2018 New Revision: 333069 URL: http://llvm.org/viewvc/llvm-project?rev=333069=rev Log: Fix unaligned memory access when reading INPUT_FILE_OFFSETS data Summary: The blob data is unaligned, so we also should read it as such. Should fix the random

r334471 - Fix that AlignedAllocation.h doesn't compile because of VersionTuple

2018-06-11 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon Jun 11 20:43:21 2018 New Revision: 334471 URL: http://llvm.org/viewvc/llvm-project?rev=334471=rev Log: Fix that AlignedAllocation.h doesn't compile because of VersionTuple Summary: rL334399 put VersionTuple in the llvm namespace, but this header still assumes it's

  1   2   >