This is an archive of the discontinued LLVM Phabricator instance.

[clang-diff] Improve and test getNodeValue
ClosedPublic

Authored by johannes on Aug 1 2017, 1:56 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

johannes created this revision.Aug 1 2017, 1:56 PM
johannes updated this revision to Diff 109309.Aug 2 2017, 2:58 AM

parent changed

klimek added inline comments.Aug 2 2017, 3:43 AM
lib/Tooling/ASTDiff/ASTDiff.cpp
395 ↗(On Diff #109309)

Usually we use the initial letter of the type that we now have:
For example, use V (for ValueDecl) here, N for NamedDecl, etc

test/Tooling/clang-diff-ast.cpp
32 ↗(On Diff #109309)

For my curiosity: why are there semicolons here? Is the format documented somewhere?

johannes updated this revision to Diff 109425.Aug 2 2017, 1:47 PM

NFC renames

johannes updated this revision to Diff 109426.Aug 2 2017, 1:51 PM

renamse, NFC

johannes added inline comments.Aug 2 2017, 2:14 PM
test/Tooling/clang-diff-ast.cpp
32 ↗(On Diff #109309)

To avoid collisions (the value should be unique per TypedefDecl in this example), the second one is unnecessary I guess. It is not documented, If it works out I want to move to StmtDataCollector for node comparison and keep these just for visualisation / debugging.

arphaman added inline comments.Aug 11 2017, 8:34 AM
lib/Tooling/ASTDiff/ASTDiff.cpp
428 ↗(On Diff #109426)

It looks like you're doing a lot of work for constructors here, but I don't seem them tested in this patch.

johannes updated this revision to Diff 110952.Aug 14 2017, 6:27 AM

add test for delegating initializer and unwritten initializer

arphaman accepted this revision.Aug 14 2017, 7:43 AM

Perfect, thanks!

This revision is now accepted and ready to land.Aug 14 2017, 7:43 AM
This revision was automatically updated to reflect the committed changes.