[PATCH] D60503: [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 10 04:43:17 PDT 2019


sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

There are cases where Sema can't tell that "foo" in foo::Bar is a
namespace qualifier, like in incomplete macro expansions.

After this patch, if sema reports no specifier but it looks like there's one in
the source code, then we take it into account.

Reworked structure and comments in getQueryScopes to try to fight
creeping complexity - unsure if I succeeded.

I made the test harder (the original version also passes).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D60503

Files:
  clangd/CodeComplete.cpp
  unittests/clangd/CodeCompleteTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60503.194479.patch
Type: text/x-patch
Size: 11435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190410/1c7644b1/attachment-0001.bin>


More information about the cfe-commits mailing list