reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/ADT/Optional.h
   87   template <class... Args> void emplace(Args &&... args) {
  144     T value;
  172   T &getValue() LLVM_LVALUE_FUNCTION noexcept {
  176   T const &getValue() const LLVM_LVALUE_FUNCTION noexcept {
  181   T &&getValue() && noexcept {
  197       ::new ((void *)std::addressof(value)) T(y);
  206       ::new ((void *)std::addressof(value)) T(std::move(y));
  216   optional_detail::OptionalStorage<T> Storage;
  219   using value_type = T;
  224   Optional(const T &y) : Storage(optional_detail::in_place_t{}, y) {}
  227   Optional(T &&y) : Storage(optional_detail::in_place_t{}, std::move(y)) {}
  230   Optional &operator=(T &&y) {
  237   template <typename... ArgTypes> void emplace(ArgTypes &&... Args) {
  241   static inline Optional create(const T *y) {
  245   Optional &operator=(const T &y) {
  253   const T *getPointer() const { return &Storage.getValue(); }
  254   T *getPointer() { return &Storage.getValue(); }
  255   const T &getValue() const LLVM_LVALUE_FUNCTION { return Storage.getValue(); }
  256   T &getValue() LLVM_LVALUE_FUNCTION { return Storage.getValue(); }
  260   const T *operator->() const { return getPointer(); }
  261   T *operator->() { return getPointer(); }
  262   const T &operator*() const LLVM_LVALUE_FUNCTION { return getValue(); }
  263   T &operator*() LLVM_LVALUE_FUNCTION { return getValue(); }
  266   constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
  266   constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION {
  267     return hasValue() ? getValue() : std::forward<U>(value);
  271   T &&getValue() && { return std::move(Storage.getValue()); }
  272   T &&operator*() && { return std::move(Storage.getValue()); }
  275   T getValueOr(U &&value) && {
  275   T getValueOr(U &&value) && {
include/llvm/ADT/STLExtras.h
 1002       std::is_same<T, U>::value || is_one_of<T, Ts...>::value;
 1002       std::is_same<T, U>::value || is_one_of<T, Ts...>::value;
include/llvm/ADT/StringSwitch.h
   48   Optional<T> Result;
   67   StringSwitch &Case(StringLiteral S, T Value) {
   74   StringSwitch& EndsWith(StringLiteral S, T Value) {
   81   StringSwitch& StartsWith(StringLiteral S, T Value) {
   88   StringSwitch &Cases(StringLiteral S0, StringLiteral S1, T Value) {
   93                       T Value) {
   98                       StringLiteral S3, T Value) {
  103                       StringLiteral S3, StringLiteral S4, T Value) {
  109                       T Value) {
  115                       StringLiteral S6, T Value) {
  121                       StringLiteral S6, StringLiteral S7, T Value) {
  128                       T Value) {
  135                       StringLiteral S9, T Value) {
  140   StringSwitch &CaseLower(StringLiteral S, T Value) {
  147   StringSwitch &EndsWithLower(StringLiteral S, T Value) {
  154   StringSwitch &StartsWithLower(StringLiteral S, T Value) {
  161   StringSwitch &CasesLower(StringLiteral S0, StringLiteral S1, T Value) {
  166                            T Value) {
  171                            StringLiteral S3, T Value) {
  176                            StringLiteral S3, StringLiteral S4, T Value) {
  181   R Default(T Value) {
  181   R Default(T Value) {
  188   operator R() {
include/llvm/Support/CommandLine.h
  426   const Ty &Init;
  427   initializer(const Ty &Val) : Init(Val) {}
  432 template <class Ty> initializer<Ty> init(const Ty &Val) {
  432 template <class Ty> initializer<Ty> init(const Ty &Val) {
  516   DataType Value;
  529   const DataType &getValue() const {
  534   void setValue(const DataType &V) {
  539   bool compare(const DataType &V) const { return Valid && (Value != V); }
  542     const OptionValueCopy<DataType> &VC =
  552 struct OptionValueBase<DataType, false> : OptionValueCopy<DataType> {
  553   using WrapperType = DataType;
  565     : OptionValueBase<DataType, std::is_class<DataType>::value> {
  565     : OptionValueBase<DataType, std::is_class<DataType>::value> {
  568   OptionValue(const DataType &V) { this->setValue(V); }
  571   template <class DT> OptionValue<DataType> &operator=(const DT &V) {
  571   template <class DT> OptionValue<DataType> &operator=(const DT &V) {
  768     OptionInfo(StringRef name, DataType v, StringRef helpStr)
  771     OptionValue<DataType> V;
  778   using parser_data_type = DataType;
  793   bool parse(Option &O, StringRef ArgName, StringRef Arg, DataType &V) {
  873   using parser_data_type = DataType;
  874   using OptVal = OptionValue<DataType>;
 1125 void printOptionDiff(const Option &O, const generic_parser_base &P, const DT &V,
 1126                      const OptionValue<DT> &Default, size_t GlobalWidth) {
 1127   OptionValue<DT> OV = V;
 1155     const ValDT &V, const OptionValue<ValDT> &Default, size_t GlobalWidth) {
 1155     const ValDT &V, const OptionValue<ValDT> &Default, size_t GlobalWidth) {
 1303   DataType Value;
 1304   OptionValue<DataType> Default;
 1310   template <class T> void setValue(const T &V, bool initial = false) {
 1315   DataType &getValue() { return Value; }
 1316   DataType getValue() const { return Value; }
 1318   const OptionValue<DataType> &getDefault() const { return Default; }
 1320   operator DataType() const { return getValue(); }
 1323   DataType operator->() const { return Value; }
 1332             public opt_storage<DataType, ExternalStorage,
 1333                                std::is_class<DataType>::value> {
 1374     const OptionValue<DataType> &V = this->getDefault();
 1383   void setDefault() override { setDefaultImpl<DataType>(); }
 1396   void setInitialValue(const DataType &V) { this->setValue(V, true); }
 1400   template <class T> DataType &operator=(const T &Val) {
include/llvm/Support/FormatVariadic.h
  253 inline auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object<decltype(
  254     std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...))> {
  256       std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...));
  259       std::make_tuple(detail::build_format_adapter(std::forward<Ts>(Vals))...));
include/llvm/Support/FormatVariadicDetails.h
   45   T Item;
   48   explicit stream_operator_format_adapter(T &&Item)
   49       : Item(std::forward<T>(Item)) {}
   62   using Decayed = typename std::decay<T>::type;
   78   using ConstRefT = const typename std::decay<T>::type &;
  143 typename std::enable_if<uses_stream_operator<T>::value,
  144                         stream_operator_format_adapter<T>>::type
  145 build_format_adapter(T &&Item) {
  150       !std::is_same<llvm::Error, typename std::remove_cv<T>::type>::value,
  152   return stream_operator_format_adapter<T>(std::forward<T>(Item));
include/llvm/Support/JSON.h
  358   Value(const T &V) : Value(toJSON(V)) {}
  607 template <typename T> bool fromJSON(const Value &E, std::vector<T> &Out) {
include/llvm/Support/type_traits.h
   91     T t;
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  122     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<const F &>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  130     static auto get(F*) -> decltype(std::declval<F &>() = std::declval<F &&>(), std::true_type{});
  145       std::is_copy_constructible<detail::trivial_helper<T>>::value;
  147       !std::is_copy_constructible<T>::value;
  151       std::is_move_constructible<detail::trivial_helper<T>>::value;
  153       !std::is_move_constructible<T>::value;
  157       is_copy_assignable<detail::trivial_helper<T>>::value;
  159       !is_copy_assignable<T>::value;
  163       is_move_assignable<detail::trivial_helper<T>>::value;
  165       !is_move_assignable<T>::value;
  169       std::is_destructible<detail::trivial_helper<T>>::value;
tools/clang/tools/extra/clangd/ClangdLSPServer.cpp
  400         Server.NegotiatedOffsetEncoding.getValueOr(OffsetEncoding::UTF16));
  462     NegotiatedOffsetEncoding = OffsetEncoding::UTF16; // fallback
  463     for (OffsetEncoding Supported : *Params.capabilities.offsetEncoding)
  464       if (Supported != OffsetEncoding::UnsupportedEncoding) {
 1192     llvm::Optional<OffsetEncoding> ForcedOffsetEncoding,
tools/clang/tools/extra/clangd/ClangdLSPServer.h
   45                   llvm::Optional<OffsetEncoding> ForcedOffsetEncoding,
  216   llvm::Optional<OffsetEncoding> NegotiatedOffsetEncoding;
tools/clang/tools/extra/clangd/Context.h
   42   static_assert(!std::is_reference<Type>::value,
  100   template <class Type> const Type *get(const Key<Type> &Key) const {
  100   template <class Type> const Type *get(const Key<Type> &Key) const {
  121   Context derive(const Key<Type> &Key,
  122                  typename std::decay<Type>::type Value) const & {
  125         std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
  131   derive(const Key<Type> &Key,
  132          typename std::decay<Type>::type Value) && /* takes ownership */ {
  162     static_assert(std::is_same<typename std::decay<T>::type, T>::value,
  162     static_assert(std::is_same<typename std::decay<T>::type, T>::value,
  166     TypedAnyStorage(T &&Value) : Value(std::move(Value)) {}
  171     T Value;
  207   WithContextValue(const Key<T> &K, typename std::decay<T>::type V)
  207   WithContextValue(const Key<T> &K, typename std::decay<T>::type V)
tools/clang/tools/extra/clangd/Protocol.cpp
 1030 static const char *toString(OffsetEncoding OE) {
 1032   case OffsetEncoding::UTF8:
 1034   case OffsetEncoding::UTF16:
 1036   case OffsetEncoding::UTF32:
 1038   case OffsetEncoding::UnsupportedEncoding:
 1043 llvm::json::Value toJSON(const OffsetEncoding &OE) { return toString(OE); }
 1044 bool fromJSON(const llvm::json::Value &V, OffsetEncoding &OE) {
 1049            .Case("utf-8", OffsetEncoding::UTF8)
 1050            .Case("utf-16", OffsetEncoding::UTF16)
 1051            .Case("utf-32", OffsetEncoding::UTF32)
 1052            .Default(OffsetEncoding::UnsupportedEncoding);
 1055 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, OffsetEncoding Enc) {
tools/clang/tools/extra/clangd/Protocol.h
  353 llvm::json::Value toJSON(const OffsetEncoding &);
  354 bool fromJSON(const llvm::json::Value &, OffsetEncoding &);
  355 llvm::raw_ostream &operator<<(llvm::raw_ostream &, OffsetEncoding);
  421   llvm::Optional<std::vector<OffsetEncoding>> offsetEncoding;
tools/clang/tools/extra/clangd/SourceCode.cpp
   86 static size_t measureUnits(llvm::StringRef U8, int Units, OffsetEncoding Enc,
   93   case OffsetEncoding::UTF8:
   96   case OffsetEncoding::UTF16:
  105   case OffsetEncoding::UTF32:
  112   case OffsetEncoding::UnsupportedEncoding:
  123 Key<OffsetEncoding> kCurrentOffsetEncoding;
  124 static OffsetEncoding lspEncoding() {
  126   return Enc ? *Enc : OffsetEncoding::UTF16;
  133   case OffsetEncoding::UTF8:
  136   case OffsetEncoding::UTF16:
  142   case OffsetEncoding::UTF32:
  148   case OffsetEncoding::UnsupportedEncoding:
tools/clang/tools/extra/clangd/SourceCode.h
   45 extern Key<OffsetEncoding> kCurrentOffsetEncoding;
tools/clang/tools/extra/clangd/tool/ClangdMain.cpp
  356 opt<OffsetEncoding> ForceOffsetEncoding{
  367     init(OffsetEncoding::UnsupportedEncoding),
  666   llvm::Optional<OffsetEncoding> OffsetEncodingFromFlag;
  667   if (ForceOffsetEncoding != OffsetEncoding::UnsupportedEncoding)
tools/clang/tools/extra/clangd/unittests/SourceCodeTests.cpp
   62   WithContextValue UTF8(kCurrentOffsetEncoding, OffsetEncoding::UTF8);
   71   WithContextValue UTF32(kCurrentOffsetEncoding, OffsetEncoding::UTF32);
  153   WithContextValue UTF32(kCurrentOffsetEncoding, OffsetEncoding::UTF32);
  210   WithContextValue UTF8(kCurrentOffsetEncoding, OffsetEncoding::UTF8);
  248   WithContextValue UTF32(kCurrentOffsetEncoding, OffsetEncoding::UTF32);
  268   WithContextValue UTF8(kCurrentOffsetEncoding, OffsetEncoding::UTF8);
usr/include/c++/7.4.0/bits/alloc_traits.h
  387       using allocator_type = allocator<_Tp>;
  389       using value_type = _Tp;
  392       using pointer = _Tp*;
  395       using const_pointer = const _Tp*;
usr/include/c++/7.4.0/bits/allocator.h
  108     class allocator: public __allocator_base<_Tp>
  113       typedef _Tp*       pointer;
  114       typedef const _Tp* const_pointer;
  115       typedef _Tp&       reference;
  116       typedef const _Tp& const_reference;
  117       typedef _Tp        value_type;
  137 	allocator(const allocator<_Tp1>&) throw() { }
usr/include/c++/7.4.0/bits/cpp_type_traits.h
  329     : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
  329     : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
  337     : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
  337     : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
usr/include/c++/7.4.0/bits/move.h
   46     inline _GLIBCXX_CONSTEXPR _Tp*
   47     __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
   72     constexpr _Tp&&
   73     forward(typename std::remove_reference<_Tp>::type& __t) noexcept
   83     constexpr _Tp&&
   84     forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
   98     move(_Tp&& __t) noexcept
  104     : public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
  105                     is_copy_constructible<_Tp>>::type { };
  136     inline _GLIBCXX17_CONSTEXPR _Tp*
  137     addressof(_Tp& __r) noexcept
  143     const _Tp* addressof(const _Tp&&) = delete;
  143     const _Tp* addressof(const _Tp&&) = delete;
usr/include/c++/7.4.0/bits/stl_algobase.h
  356         static _Tp*
  357         __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
  357         __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
  357         __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
  361 					   is_move_assignable<_Tp>,
  362 					   is_copy_assignable<_Tp>>;
  368 	    __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
  737     __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
  738     __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
  784     fill_n(_OI __first, _Size __n, const _Tp& __value)
usr/include/c++/7.4.0/bits/stl_construct.h
  204 	     allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_iterator.h
 1224     __make_move_if_noexcept_iterator(_Tp* __i)
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h
  181       typedef _Tp                         value_type;
  183       typedef _Tp*                        pointer;
  184       typedef _Tp&                        reference;
  192       typedef _Tp                         value_type;
  194       typedef const _Tp*                  pointer;
  195       typedef const _Tp&                  reference;
usr/include/c++/7.4.0/bits/stl_uninitialized.h
  288 			   _ForwardIterator __result, allocator<_Tp>&)
  644 				allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_vector.h
   77 	rebind<_Tp>::other _Tp_alloc_type;
  216     class vector : protected _Vector_base<_Tp, _Alloc>
  227       typedef _Vector_base<_Tp, _Alloc>			_Base;
  232       typedef _Tp					value_type;
  919       _Tp*
  923       const _Tp*
usr/include/c++/7.4.0/bits/unique_ptr.h
  824     make_unique(_Args&&... __args)
  825     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
usr/include/c++/7.4.0/ext/alloc_traits.h
  117       { typedef typename _Base_type::template rebind_alloc<_Tp> other; };
usr/include/c++/7.4.0/ext/new_allocator.h
   63       typedef _Tp*       pointer;
   64       typedef const _Tp* const_pointer;
   65       typedef _Tp&       reference;
   66       typedef const _Tp& const_reference;
   67       typedef _Tp        value_type;
  111 	return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
  130       { return size_t(-1) / sizeof(_Tp); }
usr/include/c++/7.4.0/initializer_list
   50       typedef _E 		value_type;
   51       typedef const _E& 	reference;
   52       typedef const _E& 	const_reference;
   54       typedef const _E* 	iterator;
   55       typedef const _E* 	const_iterator;
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  326     : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
  354     : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  762     typename add_rvalue_reference<_Tp>::type declval() noexcept;
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  825     : public __is_destructible_safe<_Tp>::type
  984       typedef decltype(__test<_Tp, _Arg>(0)) type;
  989     : public __and_<is_destructible<_Tp>,
  990                     __is_direct_constructible_impl<_Tp, _Arg>>
 1072 			 __is_direct_constructible_ref_cast<_Tp, _Arg>,
 1073 			 __is_direct_constructible_new_safe<_Tp, _Arg>
 1079     : public __is_direct_constructible_new<_Tp, _Arg>::type
 1119     : public __is_direct_constructible<_Tp, _Arg>
 1130     : public __is_constructible_impl<_Tp, _Args...>::type
 1142     : public is_constructible<_Tp, const _Tp&>
 1142     : public is_constructible<_Tp, const _Tp&>
 1148     : public __is_copy_constructible_impl<_Tp>
 1160     : public is_constructible<_Tp, _Tp&&>
 1160     : public is_constructible<_Tp, _Tp&&>
 1166     : public __is_move_constructible_impl<_Tp>
 1215     : public __and_<is_constructible<_Tp, _Args...>,
 1216 		    __is_nt_constructible_impl<_Tp, _Args...>>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1252     : public __is_nothrow_move_constructible_impl<_Tp>
 1268       typedef decltype(__test<_Tp, _Up>(0)) type;
 1274       : public __is_assignable_helper<_Tp, _Up>::type
 1286     : public is_assignable<_Tp&, const _Tp&>
 1286     : public is_assignable<_Tp&, const _Tp&>
 1292     : public __is_copy_assignable_impl<_Tp>
 1304     : public is_assignable<_Tp&, _Tp&&>
 1304     : public is_assignable<_Tp&, _Tp&&>
 1310     : public __is_move_assignable_impl<_Tp>
 1538       typedef decltype(__test<_From, _To>(0)) type;
 1545     : public __is_convertible_helper<_From, _To>::type
 1554     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1629     { typedef _Tp   type; };
 1633     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1664     : public __add_rvalue_reference_helper<_Tp>
 2104     { typedef typename remove_cv<_Up>::type __type; };
 2118       typedef typename remove_reference<_Tp>::type __remove_type;