[all-commits] [llvm/llvm-project] cb9d0e: [clangd][NFC] Make Located::operator->() use point...

Nathan James via All-commits all-commits at lists.llvm.org
Tue Nov 3 17:36:32 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cb9d0e8819ad7ca2f349a57d62ea2af02d631dfa
      https://github.com/llvm/llvm-project/commit/cb9d0e8819ad7ca2f349a57d62ea2af02d631dfa
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M clang-tools-extra/clangd/ConfigFragment.h

  Log Message:
  -----------
  [clangd][NFC] Make Located::operator->() use pointer sematics

This enables using the arrow operator to access members of the contained item.
```lang=c++
Located<std::string> X;
const char* CStr = X->c_str();
```
This is inline with how classes like `Optional` handle the arrow operator.

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D90682




More information about the All-commits mailing list