summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-diff
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* [clang-diff] NFC: formatJohannes Altmanninger2017-11-051-3/+3
| | | | llvm-svn: 317434
* [clang-diff] Properly clear the selection in HTML diffJohannes Altmanninger2017-08-231-2/+2
| | | | | | | | | | Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37072 llvm-svn: 311575
* [clang-diff] HTML diff navigationJohannes Altmanninger2017-08-231-9/+56
| | | | | | | | | | | | | | Summary: This adds shortcuts j and k to jump between changes. It is especially useful in diffs with few changes. Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36685 llvm-svn: 311570
* [clang-diff] Refactor stop-after command-line flagJacob Gravelle2017-08-221-1/+1
| | | | | | | | | | | | | | | Summary: Rename stop-after to stop-diff-after. When building LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON, stop-after collides with the stop-after already present in LLVM. Reviewers: johannes, arphaman Subscribers: klimek, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D36989 llvm-svn: 311476
* [clang-diff] Improve and test getNodeValueJohannes Altmanninger2017-08-201-0/+12
| | | | | | | | | | | | 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-0/+13
| | | | | | | | | | | | | | 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] Fix compiler warningJohannes Altmanninger2017-08-191-0/+1
| | | | llvm-svn: 311249
* [clang-diff] Add HTML side-by-side diff outputJohannes Altmanninger2017-08-192-0/+173
| | | | | | | | | | Reviewers: arphaman Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D36182 llvm-svn: 311241
* [clang-diff] Fix warning about useless comparisonJohannes Altmanninger2017-08-191-1/+1
| | | | llvm-svn: 311240
* [clang-diff] Make printing of matches optionalJohannes Altmanninger2017-08-191-1/+5
| | | | | | | | | | Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36181 llvm-svn: 311237
* [clang-diff] Add option to dump the AST, one node per lineJohannes Altmanninger2017-08-191-2/+20
| | | | | | | | | | | | Summary: This is done with -ast-dump; the JSON variant has been renamed to -ast-dump-json. Reviewers: arphaman Differential Revision: https://reviews.llvm.org/D36180 llvm-svn: 311232
* Revert "Revert "[clang-diff] Move printing of matches and changes to ↵Johannes Altmanninger2017-08-191-6/+67
| | | | | | | | | | 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-1/+64
| | | | | | | 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-64/+1
| | | | | | 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-67/+6
| | | | | | 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-6/+67
| | | | | | | | | | | | | | | 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-1/+64
| | | | | | | | | | Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36178 llvm-svn: 311199
* [clang-diff] Add commandline arguments.Johannes Altmanninger2017-08-181-18/+54
| | | | | | | | | | | | | | | | Summary: Support command line options for build path and extra arguments This emulates the options accepted by clang tools that use CommonOptionsParser. Add a flag for controlling the maximum size parameter for bottom up matching. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36177 llvm-svn: 311173
* [clang-diff] Rename, NFCJohannes Altmanninger2017-07-271-2/+2
| | | | llvm-svn: 309276
* [clang-diff] Add initial implementationAlex Lorenz2017-07-212-0/+123
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