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
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
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
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
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::
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
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
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
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
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
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
11 matches
Mail list logo