summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/ASTDiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* [clang] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-03-271-1/+1
| | | | | | | | | | | r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. llvm-svn: 328636
* [clang-diff] Treat CXXCtorInitializer as a nodeJohannes Altmanninger2017-08-271-26/+36
| | | | | | | | | | Reviewers: arphaman Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D37002 llvm-svn: 311865
* [clang-diff] Remove NodeCountVisitor, NFCJohannes Altmanninger2017-08-251-35/+3
| | | | | | | | Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D37000 llvm-svn: 311770
* [clang-diff] Fix getRelativeNameJohannes Altmanninger2017-08-221-2/+4
| | | | | | Handle the case when DeclContext is null. llvm-svn: 311434
* [clang-diff] Use the relative name for NamedDeclJohannes Altmanninger2017-08-221-16/+57
| | | | | | | | | | | | | | Summary: If a node referring to a name is within a class or namespace, do not use the full qualified name, but strip the namespace prefix. Reviewers: arphaman, bkramer Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36681 llvm-svn: 311433
* [clang-diff] Improve and test getNodeValueJohannes Altmanninger2017-08-201-39/+87
| | | | | | | | | | | | Summary: Use qualified names if available. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36186 llvm-svn: 311292
* [clang-diff] Fix similarity computationJohannes Altmanninger2017-08-201-13/+22
| | | | | | | | | | | | | | Summary: Add separate tests for the top-down and the bottom-up phase, as well as one for the optimal matching. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36185 llvm-svn: 311284
* [clang-diff] Filter AST nodesJohannes Altmanninger2017-08-201-1/+16
| | | | | | | | | | | | | | Summary: Ignore macros and implicit AST nodes, as well as anything outside of the main source file. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36184 llvm-svn: 311280
* [clang-diff] Simplify mappingJohannes Altmanninger2017-08-191-59/+15
| | | | | | | | | | | | | | | | | | | Summary: Until we find a decent heuristic on how to choose between multiple identical trees, there is no point in supporting multiple mappings. This also enables matching of nodes with parents of different types, because there are many instances where this is appropriate. For example for and foreach statements; functions in the global or other namespaces. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36183 llvm-svn: 311251
* Revert "Revert "[clang-diff] Move printing of matches and changes to ↵Johannes Altmanninger2017-08-191-181/+142
| | | | | | | | | | clang-diff"" Fix build by renaming ChangeKind -> Change This reverts commit 0c78c5729f29315d7945988efd048c0cb86c07ce. llvm-svn: 311222
* Revert "Revert "[clang-diff] Move the JSON export function to clang-diff""Johannes Altmanninger2017-08-191-26/+28
| | | | | | | This reverts commit eac4c13ac9ea8f12bc049e040c7b9c8a517f54e7, the original commit *should* not have caused the build failure. llvm-svn: 311216
* Revert "[clang-diff] Move the JSON export function to clang-diff"Vlad Tsyrklevich2017-08-181-28/+26
| | | | | | This reverts commit r311199, it was causing widespread build failures. llvm-svn: 311211
* Revert "[clang-diff] Move printing of matches and changes to clang-diff"Vlad Tsyrklevich2017-08-181-143/+181
| | | | | | This reverts commit r311200, it was causing widespread build failures. llvm-svn: 311210
* [clang-diff] Move printing of matches and changes to clang-diffJohannes Altmanninger2017-08-181-181/+143
| | | | | | | | | | | | | | | Summary: This also changes the output order of the changes. Now the matches are printed in pre-order, intertwined with insertions, updates, and moves. Deletions are printed afterwards. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36179 llvm-svn: 311200
* [clang-diff] Move the JSON export function to clang-diffJohannes Altmanninger2017-08-181-26/+28
| | | | | | | | | | Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36178 llvm-svn: 311199
* [clang-diff] Fix some errors and inconsistenciesJohannes Altmanninger2017-08-181-32/+25
| | | | | | | | | | | | | | | | Fix to the computation of the rightmost descendant. Prevents root nodes from being mapped if they are already mapped. This only makes a difference when we compare AST Nodes other than entire translation units, a feature which still has to be tested. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36176 llvm-svn: 311172
* [clang-diff] Renames, NFCJohannes Altmanninger2017-08-011-93/+90
| | | | llvm-svn: 309738
* [clang-diff] Move data declarations to the public headerJohannes Altmanninger2017-08-011-7/+116
| | | | llvm-svn: 309737
* [clang-diff] Get rid of unused variable warnings in ASTDiff.cppAlex Lorenz2017-07-211-6/+4
| | | | llvm-svn: 308737
* Fix another compiler error from r308731Alex Lorenz2017-07-211-1/+1
| | | | | | | std::pair in emplace back couldn't be constructed because SNodeId has an explicit constructor. Not sure how this even compiled on my machine before. llvm-svn: 308734
* Fix tuple construction compiler error from r308731Alex Lorenz2017-07-211-1/+1
| | | | llvm-svn: 308733
* [clang-diff] Add initial implementationAlex Lorenz2017-07-212-0/+923
This is the first commit for the "Clang-based C/C++ diff tool" GSoC project. ASTDiff is a new library that computes a structural AST diff between two ASTs using the gumtree algorithm. Clang-diff is a new Clang tool that will show the structural code changes between different ASTs. Patch by Johannes Altmanninger! Differential Revision: https://reviews.llvm.org/D34329 llvm-svn: 308731
OpenPOWER on IntegriCloud