This is an archive of the discontinued LLVM Phabricator instance.

[clang-diff] Move the JSON export function to clang-diff
ClosedPublic

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

Diff Detail

Repository
rL LLVM

Event Timeline

johannes created this revision.Aug 1 2017, 1:51 PM
arphaman added inline comments.Aug 2 2017, 4:31 AM
include/clang/Tooling/ASTDiff/ASTDiff.h
105 ↗(On Diff #109202)

Please add a documentation comment that mentions what kind of value is returned by the function. getSourceRangeOffsets might be a more a descriptive name as well.

johannes updated this revision to Diff 109416.Aug 2 2017, 1:34 PM

getSourceRangeOffsets, test

johannes marked an inline comment as done.Aug 2 2017, 1:56 PM
arphaman added inline comments.Aug 3 2017, 1:26 AM
test/Tooling/clang-diff-json.cpp
1 ↗(On Diff #109416)

I think you have to use %python instead of python, like LLVM tests do.

johannes added inline comments.Aug 3 2017, 2:21 AM
test/Tooling/clang-diff-json.cpp
1 ↗(On Diff #109416)

ok
So I have to use python 2.7? (for the test in https://reviews.llvm.org/D36182)

arphaman added inline comments.Aug 3 2017, 3:01 AM
test/Tooling/clang-diff-json.cpp
1 ↗(On Diff #109416)

Yeah, 2.7 support is still a requirement.

johannes added inline comments.Aug 3 2017, 3:30 AM
test/Tooling/clang-diff-json.cpp
1 ↗(On Diff #109416)

It looks like %python is expanded in the wrong way.
I get the same as when using %Sython, the directory of the test case is substituted

arphaman added inline comments.Aug 3 2017, 3:52 AM
test/Tooling/clang-diff-json.cpp
1 ↗(On Diff #109416)

It might not be in the lit.cfg for Clang, let me check.

arphaman edited edge metadata.Aug 3 2017, 4:24 AM

@johannes , you have to add %python substitution to lit.cfg, see my attached patch that does it.

johannes updated this revision to Diff 109537.Aug 3 2017, 6:33 AM

use %python in tests

arphaman accepted this revision.Aug 3 2017, 6:36 AM

LGTM

This revision is now accepted and ready to land.Aug 3 2017, 6:36 AM
This revision was automatically updated to reflect the committed changes.