[PATCH] D90682: [clangd][NFC] Make Located::operator->() use pointer sematics
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 17:36:23 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcb9d0e8819ad: [clangd][NFC] Make Located::operator->() use pointer sematics (authored by njames93).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90682/new/
https://reviews.llvm.org/D90682
Files:
clang-tools-extra/clangd/ConfigFragment.h
Index: clang-tools-extra/clangd/ConfigFragment.h
===================================================================
--- clang-tools-extra/clangd/ConfigFragment.h
+++ clang-tools-extra/clangd/ConfigFragment.h
@@ -51,8 +51,8 @@
: Range(Range), Value(std::move(Value)) {}
llvm::SMRange Range;
- T &operator->() { return Value; }
- const T &operator->() const { return Value; }
+ T *operator->() { return &Value; }
+ const T *operator->() const { return &Value; }
T &operator*() { return Value; }
const T &operator*() const { return Value; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90682.302719.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201104/0791a655/attachment.bin>
More information about the cfe-commits
mailing list