[PATCH] D58185: [clangd] Handle unresolved scope specifier when fixing includes.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 13 08:04:02 PST 2019


ioeric created this revision.
ioeric added a reviewer: sammccall.
Herald added subscribers: cfe-commits, jdoerfert, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
ioeric updated this revision to Diff 186674.
ioeric added a comment.
ioeric edited the summary of this revision.

- Remove unintended change.


In the following examples, "clangd" is unresolved, and the fixer will try to fix
include for `clang::clangd`; however, clang::clangd::X is usually intended. So
when handling a qualifier that is unresolved, we change the unresolved name and
scopes so that the fixer will fix "clang::clangd::X" in the following example.

    namespace clang {
    	clangd::X
  	~~~~~~
    }
    // or
    clang::clangd::X
           ~~~~~~


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D58185

Files:
  clangd/IncludeFixer.cpp
  unittests/clangd/DiagnosticsTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58185.186674.patch
Type: text/x-patch
Size: 11144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190213/ed0a21e6/attachment-0001.bin>


More information about the cfe-commits mailing list