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

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354330: [clangd] Handle unresolved scope specifier when fixing includes. (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

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

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187359. ioeric added a comment. - minor cleanup Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/IncludeFixer.cpp unittests/clangd/DiagnosticsTests.cpp

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

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187343. ioeric marked 16 inline comments as done. ioeric added a comment. - address review comment Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/Include

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

2019-02-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.cpp:191 +//~~ +llvm::Optional qualifiedByUnresolved(llvm::StringRef Code, + size_t Offset) { sammccall wrote: > this isn't wrong per se

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

2019-02-18 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Eric, I have just couple details. Comment at: clangd/IncludeFixer.cpp:188 +// first character after the unresolved name in \p Code. For the example below, +// this returns "::X::Y" that is qualfied by unresolved name "clangd": +// clang::clangd::

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

2019-02-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! The layering is *much* clearer now. I can still suggest a couple of tweaks, but they're pretty much cosmetic. Comment at: clangd/IncludeFixer.cpp:190 +// cl

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

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 187222. ioeric marked 9 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/Include

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

2019-02-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/IncludeFixer.cpp:235 + std::string Spelling = (Code.substr(B, E - B) + "::").str(); + if (llvm::StringRef(SpecifiedNS).endswith(Spelling)) +SpecifiedScope = SpecifiedNS; sammccall wrot

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

2019-02-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/IncludeFixer.cpp:208 +SM.getBufferData(SM.getDecomposedLoc(Typo.getLoc()).first, &Invalid); +assert(!Invalid); // Extract the typed scope. This is not done lazily because `SS` can get No idea wh

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

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 186674. ioeric added a comment. - Remove unintended change. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58185/new/ https://reviews.llvm.org/D58185 Files: clangd/IncludeFixer.cpp unittests/clangd/Diagnostic

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

2019-02-13 Thread Eric Liu via Phabricator via cfe-commits
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