[PATCH] D36686: [clang-diff] Add option to compare files across git revisions

2017-08-14 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D36686#840827, @arphaman wrote: > It might be useful to have both source and destination in a different > revision. Maybe something like `-src-git-rev` and `-dst-git-rev`? Then I'd rather have a revision range such as `-git-revs ..` and if

[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

2017-08-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 111316. johannes edited the summary of this revision. johannes removed a subscriber: rsmith. johannes added a comment. - fix comments - add unittest for the new node kinds - make `addData()` take a const reference https://reviews.llvm.org/D36664 Files: i

[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

2017-08-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 111317. johannes added a subscriber: rsmith. johannes added a comment. add https://reviews.llvm.org/D36664 Files: include/clang/AST/DataCollection.h include/clang/Analysis/CloneDetection.h lib/AST/CMakeLists.txt lib/AST/DataCollection.cpp lib/AST

[PATCH] D36664: [analyzer] Make StmtDataCollector customizable

2017-08-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D36664#841758, @teemperor wrote: > Very well done, I really like this patch! I added a few remarks mostly about > the comments that need some small adjusting. > > I'm wondering what would be a nice way of creating a StmtDataCollector that >

[PATCH] D36686: [clang-diff] Add option to compare files across git revisions

2017-08-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 111328. johannes edited the summary of this revision. johannes added a comment. accept a commit range https://reviews.llvm.org/D36686 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ===

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-18 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 111695. johannes added a comment. only use Enums as namespace prefix in C++11 https://reviews.llvm.org/D36187 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-diff-bas

[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

2017-08-18 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:371 + std::string ContextPrefix; + if (auto *Namespace = dyn_cast(Context)) +ContextPrefix = Namespace->getQualifiedNameAsString(); arphaman wrote: > You don't need to check both `N

[PATCH] D35948: [CommonOptionsParser] Expose ArgumentsAdjustingCompilationDatabase

2017-08-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes accepted this revision. johannes added a comment. This revision is now accepted and ready to land. This has already landed. https://reviews.llvm.org/D35948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes accepted this revision. johannes added a comment. This revision is now accepted and ready to land. Looks good, thanks! You can remove StopAfterTopDown from the ComparisonOptions struct definition I have a second option stop-after option coming up but I will use another boolean for it, i

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes requested changes to this revision. johannes added a comment. This revision now requires changes to proceed. Oh wait I get linker errors with BUILD_SHARED_LIBS=1 `undefined reference to ClangDiffCategory` in ASTDiff https://reviews.llvm.org/D36989 ___

[PATCH] D36685: [clang-diff] HTML diff navigation

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112126. johannes added a comment. some refactoring https://reviews.llvm.org/D36685 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/Clan

[PATCH] D36686: [clang-diff] Add option to compare files across git revisions

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112127. johannes added a comment. casing https://reviews.llvm.org/D36686 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/ClangDiff.cpp +

[PATCH] D36997: [clang-diff] Honor macros

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. Nodes that are expanded from some macro are given a special "Macro" kind instead of an ASTNodeKind. They are compared by their textual value including arguments, before expansion. https://reviews.llvm.org/D36997 Files: include

[PATCH] D36998: [AST] Make TraverseTemplateParameterListHelper public

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. This is useful for clients that want to create a visitor that visits template parameters before visiting the declaration that uses them. https://reviews.llvm.org/D36998 Files: include/clang/AST/RecursiveASTVisitor.h Index: include/clang/AST/RecursiveASTVisito

[PATCH] D36999: [AST] Add DeclDataCollectors.inc

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. This adds some macros for collecting data from Decl nodes. However, it is incomplete as its not always clear which data should be collected, plus there are missing nodes. So this probably needs some tuning if it is useful enough to get merged. https://reviews.llv

[PATCH] D37000: [clang-diff] Remove NodeCountVisitor, NFC

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37000 Files: lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tool

[PATCH] D37001: [clang-diff] Use data collectors for node comparison

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37001 Files: lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tooli

[PATCH] D37002: [clang-diff] Treat CXXCtorInitializer as a node

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D37002 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp Index: test/Tooling/clang-diff-ast.cpp === --- test/Toolin

[PATCH] D37003: [clang-diff] Support templates

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. TemplateName and TemplateArgument are recognised. https://reviews.llvm.org/D37003 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-dif

[PATCH] D37004: [clang-diff] Fix the html output for CXXOperatorCallExpr

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added subscribers: mgorny, klimek. The operator is always the first child of such an expression. If it is an infix operator, we want to print the LHS first. https://reviews.llvm.org/D37004 Files: test/Tooling/clang-diff-ast.cpp tools/clang-diff/CMakeLi

[PATCH] D37005: Add include/clang/Tooling/ASTDiff/ASTPatch.h

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added subscribers: mgorny, klimek. This adds a functions to remove AST nodes. It works for Decl, and for Stmt nodes that are children of a CompoundStmt. Sometimes it is not possible to remove a Decl from its context despite DeclContext.containsDecl() returni

[PATCH] D36989: [clang-diff] Refactor stop-after command-line flag

2017-08-22 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D36989#848835, @jgravelle-google wrote: > If you have more stop-after options it'd probably be simpler to leave it as > one field. I'll just rename it to "stop-diff-after" to avoid the name > collision. Ok, you can go ahead. Or, if I shoul

[PATCH] D37072: [clang-diff] Properly clear the selection in HTML diff

2017-08-23 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. https://reviews.llvm.org/D37072 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/ClangDiff.cpp +++ tools/clang-diff/ClangDiff.cpp @@ -140,9 +140,

[PATCH] D37004: [clang-diff] Fix the html output for CXXOperatorCallExpr

2017-08-23 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112416. johannes added a comment. provide a test need to update the maxsize parameter to -s=200 here because the test file is expected to fit within this size https://reviews.llvm.org/D37004 Files: test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tool

[PATCH] D36998: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-08-25 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112671. johannes retitled this revision from "[AST] Make TraverseTemplateParameterListHelper public" to "[AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor". johannes edited the summary of this revision. johannes added a reviewer: arphaman. joha

[PATCH] D36998: [AST] Traverse templates in LexicallyOrderedRecursiveASTVisitor

2017-08-25 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp:146 + DummyMatchVisitor Visitor; + Visitor.ExpectMatch("/f/T", 2, 11); + Visitor.ExpectMatch("/f/f/", 2, 20); This test also works before the change; what

[PATCH] D37003: [clang-diff] Support templates

2017-08-25 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 112673. johannes edited the summary of this revision. johannes added a comment. use LexicallyOrderedRecursiveASTVisitor https://reviews.llvm.org/D37003 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tooling/c

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars

2022-06-10 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. No idea why the conversion fails for the wide string. First step is to reproduce the problem. I guess we should try in a Ubuntu VM. Is there an easy way to see if other builders succeeded? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide chars

2022-05-31 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes requested changes to this revision. johannes added a comment. This revision now requires changes to proceed. I wonder if clang-diff is useful in its current state, I remember there are many edge cases left over. Anyway, I've left some minor comments. I'm not sure how to download a patch

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide chars

2022-06-06 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes requested changes to this revision. johannes added a comment. This revision now requires changes to proceed. I've suggested some more refactorings but otherwise this should be good to go Comment at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:497 + return str; +}

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars

2022-06-07 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes accepted this revision. johannes added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:477 + } else if (String->isUTF16()) { +const auto *Chars = reinterpret_cast(Bytes); +if (!conve

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars

2022-06-07 Thread Johannes Altmanninger via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe80748ff8840: [clang-diff] Fix assertion error when dealing with wide strings (authored by PRESIDENT810, committed by johannes). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars

2022-06-07 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. Ok thanks, I will take a look later. Might be a locale issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126651/new/ https://reviews.llvm.org/D126651 ___ cfe-commits mailing

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-15 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a project: clang. Fixes pr/43700. Also simplify another call, and make the CGF member a const pointer since it is public but only assigned in the constructor. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70302 Files: clang/lib/

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 229556. johannes added a comment. Remove unneccesary const on parameter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70302/new/ https://reviews.llvm.org/D70302 Files: clang/lib/CodeGen/CGExprAgg.cpp clan

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-16 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes marked an inline comment as done. johannes added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1021 void CodeGenModule::EmitExplicitCastExprType(const ExplicitCastExpr *E, - CodeGenFunction *CGF) { +

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 231330. johannes edited the summary of this revision. johannes added a comment. update commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70302/new/ https://reviews.llvm.org/D70302 Files: clang/li

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG1ac700cdef78: [CodeGen] Fix clang crash on aggregate initialization of array of labels (authored by johannes). Repository

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. Committed as 1ac700cdef787383ad49a0e37d9894491ef19480 - this should be a safe fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70302/new/ https://rev

[PATCH] D70302: [CodeGen] Fix clang crash on aggregate initialization of array of labels

2019-11-30 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In D70302#1763025 , @rnk wrote: > Fix looks good post commit, but we should enhance the test. I see, apologies for the premature commit. Comment at: clang/test/CodeGen/label-array-aggregate-init.c:1 +// RUN:

[PATCH] D39644: [clang-diff] Use references to Node instead of NodeId

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. This adds to each node a reference to its syntax tree. As a result, instead of passing around the tree plus the node ID, we just use a reference to the node. This removes some potential for errors. Users will almost always use node

[PATCH] D39645: [clang-diff] NFC: replace const Node & with a typedef'd NodeRef

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39645 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ===

[PATCH] D39646: [clang-diff] Rename ChangeKind::None to NoChange

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39646 Files: include/clang/Tooling/ASTDiff/ASTDiff.h tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tool

[PATCH] D39647: [clang-diff] NFC: remove Mapping

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. Store it within ASTDiff::Impl instead. https://reviews.llvm.org/D39647 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ==

[PATCH] D39648: [clang-diff] NFC: organise header

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39648 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- li

[PATCH] D39649: [clang-diff] Split findPositionInParent

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. This makes findPositionInParent() a member of Node. Additionally, the function that computes the new position that is dependent on insertions and deletions of siblings, is now a member of ASTDiff::Impl. https://reviews.llvm.org/

[PATCH] D39650: [clang-diff] Make getSourceRangeOffsets a member of Node

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39650 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ==

[PATCH] D39651: [clang-diff] NFC: renames, moves

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39651 Files: lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tool

[PATCH] D39652: [clang-diff] NFC: factor out getCompilationDatabase()

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. https://reviews.llvm.org/D39652 Files: tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp === --- tools/clang-diff/ClangDiff.cpp +++ tools/clang-diff/ClangDiff.cpp @@ -84,27 +84,3

[PATCH] D36687: [clang-diff] Match nodes with the same parent and same value

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121641. johannes added a comment. update https://reviews.llvm.org/D36687 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-bottomup.cpp test/Tooling/clang-diff-heuristics.cpp test/Tooling/clang

[PATCH] D36997: [clang-diff] Honor macros

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121642. johannes added a comment. update https://reviews.llvm.org/D36997 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clan

[PATCH] D39653: [clang-diff] Add utility functions, forbid copying Node

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39653 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- li

[PATCH] D39655: [clang-diff] Expose Node::getSourceRange()

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39655 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-json.cpp Index: test/Tooling/clang-diff-json.cpp ===

[PATCH] D37001: [clang-diff] Use data collectors for node comparison

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121647. johannes added a comment. use raw source code of owned tokens instead https://reviews.llvm.org/D37001 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-basic.cpp test/Tooling/clang-diff-h

[PATCH] D39656: [clang-diff] Remove getNodeValue

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39656 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-diff-basic.cpp test/Tooling/clang-diff-bottomup.cpp test

[PATCH] D36688: [clang-diff] Fix matching for unnamed NamedDecs

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121649. johannes added a comment. update https://reviews.llvm.org/D36688 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-heuristics.cpp Index: test/Tooling/clang-diff-heuristics.cpp =

[PATCH] D37003: [clang-diff] Support templates

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121650. johannes added a comment. update https://reviews.llvm.org/D37003 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/Inputs/clang-diff-basic-src.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-diff-basic.cpp test/Tooling/clang-diff

[PATCH] D39658: [clang-diff] Treat QualType / TypeLoc as a node

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39658 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp test/Tooling/clang-diff-basic.cpp test/Tooling/clang-diff-bottomup.cpp test/Tooling/clang-diff-heuristics.cpp test/

[PATCH] D39659: [clang-diff] Store changes within ASTDiff::Impl

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. This way we avoid modifying SyntaxTree::Impl except during construction. https://reviews.llvm.org/D39659 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp tools/clang-diff/ClangDiff.cpp Index:

[PATCH] D39660: [clang-diff] Don't ignore nodes from other files

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39660 Files: lib/Tooling/ASTDiff/ASTDiff.cpp test/Tooling/clang-diff-ast.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ==

[PATCH] D39661: [clang-diff] Move printing of changes to the ASTDiff library

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39661 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp tools/clang-diff/ClangDiff.cpp Index: tools/clang-diff/ClangDiff.cpp ===

[PATCH] D39662: [clang-diff] Enable postorder traversal

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. https://reviews.llvm.org/D39662 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp Index: lib/Tooling/ASTDiff/ASTDiff.cpp === --- lib

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 121656. johannes added a comment. update https://reviews.llvm.org/D37005 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTPatch.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/ASTPatch.cpp lib/Tooling/ASTDiff/

[PATCH] D39663: [clang-diff] Split source ranges at points where nodes are inserted.

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. This enables inserting into empty CompoundStmt nodes, for example. Previously the insertion would occur only after the closing parenthesis. https://reviews.llvm.org/D39663 Files: lib/Tooling/ASTDiff/ASTPatch.cpp unittests/To

[PATCH] D39664: [clang-diff] patching: implement updates

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes created this revision. Herald added a subscriber: klimek. This allows to patch nodes that have been updated. We use a LCS algorithm to determine which tokens changed, and update accordingly. https://reviews.llvm.org/D39664 Files: lib/Tooling/ASTDiff/ASTPatch.cpp unittests/Tooling/A

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-26 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104032. johannes added a comment. refactor https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooli

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104124. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clan

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104249. johannes added a comment. - pass Options as a const reference instead of a pointer - rename TreeComparator -> ASTDiff::Impl, rename Comparator -> DiffImpl - move declaration of ASTDiff::Impl from the header to the source file so that Options does not

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-28 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104394. johannes added a comment. - remove unused struct - rename getNodeValueI -> getNodeValueImpl https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/AST

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-28 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104395. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clan

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-28 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104401. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clan

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-29 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 104664. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clan

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-29 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes marked 2 inline comments as done. johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:439 +// Computes an optimal mapping between two trees. +class ZsMatcher { + const ASTDiff::Impl &DiffImpl; arphaman wrote: > Do you know the re

[PATCH] D34329: [clang-diff] Initial implementation.

2017-06-30 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes marked an inline comment as done. johannes added a comment. In https://reviews.llvm.org/D34329#796574, @teemperor wrote: > I didn't have time to have a close look at this patch, but it seems you're > interested in the specific TU-independent data of a Stmt to compare them. So > if you

[PATCH] D34329: [clang-diff] Initial implementation.

2017-07-03 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 105059. johannes edited the summary of this revision. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt

[PATCH] D34329: [clang-diff] Initial implementation.

2017-07-03 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D34329#798377, @arphaman wrote: > @johannes > Are you planning to work on integration with the `StmtDataCollector` in this > patch or would you prefer to follow-up with additional patches? Later would be better https://reviews.llvm.org/

[PATCH] D34329: [clang-diff] Initial implementation.

2017-07-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 105161. johannes added a comment. - style fixes - correct getSimilarity() https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Tooling/ASTDiff/ASTDiffInternal.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/AST

[PATCH] D34748: [clang-diff] Fix multiple mappings.

2017-07-09 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added a comment. In https://reviews.llvm.org/D34748#802037, @arphaman wrote: > Can you provide a test that demonstrates what this change fixed/improved? My bad, it looks like this does not improve anything yet. In order to do so I will use additional heuristics for similarity, like in

[PATCH] D34748: [clang-diff] improve mapping accuracy, HTML side-by-side diff.

2017-07-20 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 107479. johannes retitled this revision from "[clang-diff] Fix multiple mappings." to "[clang-diff] improve mapping accuracy, HTML side-by-side diff.". Herald added a subscriber: mgorny. https://reviews.llvm.org/D34748 Files: include/clang/Tooling/ASTDiff

[PATCH] D34748: [clang-diff] improve mapping accuracy

2017-07-26 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 108370. johannes retitled this revision from "[clang-diff] improve mapping accuracy, HTML side-by-side diff." to "[clang-diff] improve mapping accuracy". https://reviews.llvm.org/D34748 Files: include/clang/Tooling/ASTDiff/ASTDiff.h include/clang/Toolin

<    1   2