[clangd] Helper for getting nested namespace qualification
authorKadir Cetinkaya <kadircet@google.com>
Wed, 30 Oct 2019 08:04:10 +0000 (09:04 +0100)
committerKadir Cetinkaya <kadircet@google.com>
Mon, 25 Nov 2019 09:42:13 +0000 (10:42 +0100)
commit97d6e8e0f3748e6fe2b27983803e2df75874507e
treefadb6d5ad172e9388a01d3fb6db78ae905fd1359
parentaa16bf15fe38ae4d12d85e7610891dd48e6c0cda
[clangd] Helper for getting nested namespace qualification

Summary:
Introduce a new helper for getting minimally required qualifiers
necessary to spell a name at a point in a given DeclContext. Currently takes
using directives and nested namespecifier of DeclContext itself into account.

Initially will be used in define inline and outline actions.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69608
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/AST.h
clang-tools-extra/clangd/unittests/ASTTests.cpp