HomePhabricator

[libclang] Keep track of TranslationUnit instance when annotating tokens

Description

[libclang] Keep track of TranslationUnit instance when annotating tokens

Summary:
Previously the _tu was not propagated to the returned cursor, leading to errors when calling any
method on that cursor (e.g. cursor.referenced).

Reviewers: jbcoe, rsmith

Reviewed By: jbcoe

Subscribers: cfe-commits

Tags: #clang

Patch by jklaehn (Johann Klähn)

Differential Revision: https://reviews.llvm.org/D36953

Details