[llvm-dev] [GSoC 2017] Clang-based diff tool project

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 23 10:48:46 PDT 2017


On 20 Mar 2017, at 22:20, Johannes Altmanninger via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I am currently studying Computer Science at TU Eindhoven. I am doing a
> course that involves programming assignments on parts of LLVM such as
> lowering, scheduling and optimization. For this year's Google Summer of
> Code I plan to submit a proposal to implement a clang-based diff tool
> [1].

I had a student implement such a tool a couple of years ago as a final-year (undergrad) project.  He used the Python bindings to libclang and made something that worked with both the Python AST and the C AST exposed by libclang.  

The core idea for his work was the ability to recognise common refactoring patterns (for example inlining, outlining, variable renaming) and some fuzzy matching (so his tool could report things like ‘you renamed X to Y everywhere except here and here’).  

His code was a nice proof-of-concept, but was never tidied up enough to be ready for widespread use.  It would be great to see something a bit more robust.

David



More information about the llvm-dev mailing list