Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters