HomePhabricator

[clangd] Fix AddUsing tweak for out-of-line functions.

Authored by adamcz on May 7 2020, 3:47 AM.

Description

[clangd] Fix AddUsing tweak for out-of-line functions.

Summary:
We used getEnclosingNamespaceContext(), which calls getParent() rather
than getLexicalParent(), so we would end up adding the "using" line in
places that do not affect the cursor location, or just return an error
when declaration was in another file.

Patch by Adam Czachorowski!

Reviewers: hokein

Reviewed By: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

Details

Committed
hokeinMay 7 2020, 3:50 AM
Reviewer
hokein
Differential Revision
D79496: [clangd] Fix AddUsing tweak for out-of-line functions.
Parents
rG3bcd3dd4734d: [CodeGen][SVE] Lowering of shift operations with scalable types
Branches
Unknown
Tags
Unknown