|
reference, declaration → definition
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) {
89 ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
237 template <typename... ArgTypes> void emplace(ArgTypes &&... Args) {
238 Storage.emplace(std::forward<ArgTypes>(Args)...);
tools/clang/tools/extra/clangd/Cancellation.cpp 18 std::pair<Context, Canceler> cancelableTask() {
21 Context::current().derive(FlagKey, Flag),
26 bool isCancelled(const Context &Ctx) {
tools/clang/tools/extra/clangd/Cancellation.h 76 std::pair<Context, Canceler> cancelableTask();
81 bool isCancelled(const Context &Ctx = Context::current());
81 bool isCancelled(const Context &Ctx = Context::current());
tools/clang/tools/extra/clangd/ClangdLSPServer.cpp 397 Context handlerContext() const {
398 return Context::current().derive(
407 Context cancelableRequestContext(const llvm::json::Value &ID) {
1194 : BackgroundContext(Context::current().clone()), Transp(Transp),
tools/clang/tools/extra/clangd/ClangdLSPServer.h 140 Context BackgroundContext;
168 [CB = std::move(CB), Ctx = Context::current().clone()](
tools/clang/tools/extra/clangd/ClangdServer.cpp 146 Context::current().clone(), FSProvider, CDB,
tools/clang/tools/extra/clangd/Context.cpp 15 Context Context::empty() { return Context(/*DataPtr=*/nullptr); }
20 Context Context::clone() const { return Context(DataPtr); }
22 static Context ¤tContext() {
23 static thread_local auto C = Context::empty();
23 static thread_local auto C = Context::empty();
27 const Context &Context::current() { return currentContext(); }
29 Context Context::swapCurrent(Context Replacement) {
29 Context Context::swapCurrent(Context Replacement) {
tools/clang/tools/extra/clangd/Context.h 72 static Context empty();
74 static const Context ¤t();
77 static Context swapCurrent(Context Replacement);
77 static Context swapCurrent(Context Replacement);
91 Context(Context const &) = delete;
92 Context &operator=(const Context &) = delete;
92 Context &operator=(const Context &) = delete;
94 Context(Context &&) = default;
95 Context &operator=(Context &&) = default;
95 Context &operator=(Context &&) = default;
121 Context derive(const Key<Type> &Key,
130 Context
141 template <class Type> Context derive(Type &&Value) const & {
146 template <class Type> Context derive(Type &&Value) && {
152 Context clone() const;
161 template <class T> class TypedAnyStorage : public Context::AnyStorage {
191 WithContext(Context C) : Restore(Context::swapCurrent(std::move(C))) {}
191 WithContext(Context C) : Restore(Context::swapCurrent(std::move(C))) {}
192 ~WithContext() { Context::swapCurrent(std::move(Restore)); }
199 Context Restore;
208 : Restore(Context::current().derive(K, std::move(V))) {}
213 : Restore(Context::current().derive(std::forward<T>(V))) {}
tools/clang/tools/extra/clangd/SourceCode.cpp 125 auto *Enc = Context::current().get(kCurrentOffsetEncoding);
tools/clang/tools/extra/clangd/TUScheduler.cpp 78 if (auto *File = Context::current().get(kFileBeingProcessed))
237 Context Ctx;
586 Context::current().clone(),
644 Context::current().derive(kFileBeingProcessed, FileName), UpdateType});
923 PreambleTasks->runAsync(Name, [Ctx = Context::current().clone(),
981 Ctx = Context::current().derive(kFileBeingProcessed, File),
tools/clang/tools/extra/clangd/Threading.h 131 std::move(Action), Context::current().clone());
tools/clang/tools/extra/clangd/Trace.cpp 52 Context beginSpan(llvm::StringRef Name, llvm::json::Object *Args) override {
53 return Context::current().derive(
62 Context::current().getExisting(SpanKey)->markEnded();
95 auto *Parent = Context::current().get(SpanKey);
212 static Context makeSpanContext(llvm::Twine Name, llvm::json::Object *Args) {
214 return Context::current().clone();
tools/clang/tools/extra/clangd/Trace.h 40 virtual Context beginSpan(llvm::StringRef Name, llvm::json::Object *Args) = 0;
tools/clang/tools/extra/clangd/index/Background.cpp 138 Context BackgroundContext, const FileSystemProvider &FSProvider,
tools/clang/tools/extra/clangd/index/Background.h 121 Context BackgroundContext, const FileSystemProvider &,
168 Context BackgroundContext;
tools/clang/tools/extra/clangd/unittests/BackgroundIndexTests.cpp 95 BackgroundIndex Idx(Context::empty(), FS, CDB,
135 BackgroundIndex Idx(Context::empty(), FS, CDB,
202 BackgroundIndex Idx(Context::empty(), FS, CDB,
212 BackgroundIndex Idx(Context::empty(), FS, CDB,
270 BackgroundIndex Idx(Context::empty(), FS, CDB,
320 BackgroundIndex Idx(Context::empty(), FS, CDB,
335 BackgroundIndex Idx(Context::empty(), FS, CDB,
353 BackgroundIndex Idx(Context::empty(), FS, CDB,
394 BackgroundIndex Idx(Context::empty(), FS, CDB,
410 BackgroundIndex Idx(Context::empty(), FS, CDB,
426 BackgroundIndex Idx(Context::empty(), FS, CDB,
444 BackgroundIndex Idx(Context::empty(), FS, CDB,
473 BackgroundIndex Idx(Context::empty(), FS, CDB,
537 BackgroundIndex Idx(Context::empty(), FS, CDB,
tools/clang/tools/extra/clangd/unittests/ClangdTests.cpp 272 Got = Context::current().getExisting(Secret);
280 Got = Context::current().getExisting(Secret);
tools/clang/tools/extra/clangd/unittests/ContextTests.cpp 20 Context Ctx = Context::empty().derive(IntParam, 10).derive(ExtraIntParam, 20);
20 Context Ctx = Context::empty().derive(IntParam, 10).derive(ExtraIntParam, 20);
29 Context Ctx = Context::empty().derive(Param, std::make_unique<int>(10));
29 Context Ctx = Context::empty().derive(Param, std::make_unique<int>(10));
32 Context NewCtx = std::move(Ctx);
41 Context ParentCtx =
42 Context::empty().derive(ParentParam, 10).derive(ParentAndChildParam, 20);
43 Context ChildCtx =
tools/clang/tools/extra/clangd/unittests/TUSchedulerTests.cpp 83 auto D = Context::current().get(DiagsCallbackKey);
usr/include/c++/7.4.0/bits/invoke.h 59 __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args)
60 { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
64 __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t,
65 _Args&&... __args)
70 __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t,
71 _Args&&... __args)
78 __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t)
83 __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t)
88 constexpr typename __invoke_result<_Callable, _Args...>::type
89 __invoke(_Callable&& __fn, _Args&&... __args)
92 using __result = __invoke_result<_Callable, _Args...>;
96 std::forward<_Args>(__args)...);
usr/include/c++/7.4.0/bits/move.h 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
184 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>,
185 is_move_constructible<_Tp>,
186 is_move_assignable<_Tp>>::value>::type
187 swap(_Tp& __a, _Tp& __b)
187 swap(_Tp& __a, _Tp& __b)
198 _Tp __tmp = _GLIBCXX_MOVE(__a);
usr/include/c++/7.4.0/bits/stl_pair.h 100 return __and_<is_constructible<_T1, const _U1&>,
100 return __and_<is_constructible<_T1, const _U1&>,
107 return __and_<is_convertible<const _U1&, _T1>,
107 return __and_<is_convertible<const _U1&, _T1>,
114 return __and_<is_constructible<_T1, _U1&&>,
114 return __and_<is_constructible<_T1, _U1&&>,
121 return __and_<is_convertible<_U1&&, _T1>,
121 return __and_<is_convertible<_U1&&, _T1>,
128 using __do_converts = __and_<is_convertible<const _U1&, _T1>,
128 using __do_converts = __and_<is_convertible<const _U1&, _T1>,
133 return __and_<is_constructible<_T1, const _U1&>,
133 return __and_<is_constructible<_T1, const _U1&>,
142 using __do_converts = __and_<is_convertible<_U1&&, _T1>,
142 using __do_converts = __and_<is_convertible<_U1&&, _T1>,
147 return __and_<is_constructible<_T1, _U1&&>,
147 return __and_<is_constructible<_T1, _U1&&>,
209 : private __pair_base<_T1, _T2>
211 typedef _T1 first_type; /// @c first_type is the first bound type
214 _T1 first; /// @c first is a copy of the first object
252 using _PCCP = _PCC<true, _T1, _T2>;
260 constexpr pair(const _T1& __a, const _T2& __b)
269 explicit constexpr pair(const _T1& __a, const _T2& __b)
283 _T1, _T2>;
311 constexpr pair(_U1&& __x, const _T2& __y)
325 constexpr pair(const _T1& __x, _U2&& __y)
332 explicit pair(const _T1& __x, _U2&& __y)
341 constexpr pair(_U1&& __x, _U2&& __y)
342 : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
379 __and_<is_copy_assignable<_T1>,
390 __and_<is_move_assignable<_T1>,
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/future 766 friend future<__async_result_of<_Fn, _Args...>>
767 async(launch, _Fn&&, _Args&&...);
1721 std::forward<_Args>(__args)...)
1737 std::forward<_Args>(__args)...));
usr/include/c++/7.4.0/thread 118 thread(_Callable&& __f, _Args&&... __args)
128 std::forward<_Args>(__args)...)),
226 static __tuple_element_t<_Index, _Tuple>&&
226 static __tuple_element_t<_Index, _Tuple>&&
253 static _Invoker<__decayed_tuple<_Callable, _Args...>>
254 __make_invoker(_Callable&& __callable, _Args&&... __args)
257 std::forward<_Callable>(__callable), std::forward<_Args>(__args)...
usr/include/c++/7.4.0/tuple 56 struct __is_empty_non_tuple : is_empty<_Tp> { };
125 constexpr _Head_base(const _Head& __h)
132 constexpr _Head_base(_UHead&& __h)
133 : _M_head_impl(std::forward<_UHead>(__h)) { }
159 static constexpr _Head&
162 static constexpr const _Head&
165 _Head _M_head_impl;
186 : public _Tuple_impl<_Idx + 1, _Tail...>,
191 typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
210 constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail)
216 constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
217 : _Inherited(std::forward<_UTail>(__tail)...),
230 constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
235 constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
242 _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a)
248 const _Head& __head, const _Tail&... __tail)
344 : private _Head_base<_Idx, _Head>
348 typedef _Head_base<_Idx, _Head> _Base;
350 static constexpr _Head&
353 static constexpr const _Head&
360 constexpr _Tuple_impl(const _Head& __head)
365 constexpr _Tuple_impl(_UHead&& __head)
366 : _Base(std::forward<_UHead>(__head)) { }
373 : _Base(std::forward<_Head>(_M_head(__in))) { }
376 constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in)
380 constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in)
390 const _Head& __head)
473 return __and_<is_constructible<_Elements, const _UElements&>...>::value;
473 return __and_<is_constructible<_Elements, const _UElements&>...>::value;
479 return __and_<is_convertible<const _UElements&, _Elements>...>::value;
479 return __and_<is_convertible<const _UElements&, _Elements>...>::value;
485 return __and_<is_constructible<_Elements, _UElements&&>...>::value;
485 return __and_<is_constructible<_Elements, _UElements&&>...>::value;
491 return __and_<is_convertible<_UElements&&, _Elements>...>::value;
491 return __and_<is_convertible<_UElements&&, _Elements>...>::value;
508 return __not_<is_same<tuple<_Elements...>,
510 typename remove_reference<_UElements...>::type
556 class tuple : public _Tuple_impl<0, _Elements...>
558 typedef _Tuple_impl<0, _Elements...> _Inherited;
567 return __and_<is_default_constructible<_Elements>...>::value;
571 return __and_<__is_implicitly_default_constructible<_Elements>...>
598 _Elements...>;
608 constexpr tuple(const _Elements&... __elements)
619 explicit constexpr tuple(const _Elements&... __elements)
628 _Elements...>;
636 _Elements...>;
646 constexpr tuple(_UElements&&... __elements)
647 : _Inherited(std::forward<_UElements>(__elements)...) { }
668 _Elements...>;
730 const _Elements&... __elements)
741 const _Elements&... __elements)
853 operator=(const tuple<_UElements...>& __in)
863 operator=(tuple<_UElements...>&& __in)
907 class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
909 typedef _Tuple_impl<0, _T1, _T2> _Inherited;
939 _TC<is_same<_Dummy, void>::value, _T1, _T2>;
947 constexpr tuple(const _T1& __a1, const _T2& __a2)
956 explicit constexpr tuple(const _T1& __a1, const _T2& __a2)
961 using _TMC = _TC<true, _T1, _T2>;
971 constexpr tuple(_U1&& __a1, _U2&& __a2)
972 : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
1013 constexpr tuple(tuple<_U1, _U2>&& __in)
1066 tuple(allocator_arg_t __tag, const _Alloc& __a)
1078 const _T1& __a1, const _T2& __a2)
1090 const _T1& __a1, const _T2& __a2)
1225 operator=(const tuple<_U1, _U2>& __in)
1233 operator=(tuple<_U1, _U2>&& __in)
1280 : tuple_element<__i - 1, tuple<_Tail...> > { };
1288 typedef _Head type;
1302 constexpr _Head&
1303 __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1303 __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1304 { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1304 { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); }
1307 constexpr const _Head&
1308 __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1308 __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept
1313 constexpr __tuple_element_t<__i, tuple<_Elements...>>&
1313 constexpr __tuple_element_t<__i, tuple<_Elements...>>&
1313 constexpr __tuple_element_t<__i, tuple<_Elements...>>&
1314 get(tuple<_Elements...>& __t) noexcept
1319 constexpr const __tuple_element_t<__i, tuple<_Elements...>>&
1319 constexpr const __tuple_element_t<__i, tuple<_Elements...>>&
1319 constexpr const __tuple_element_t<__i, tuple<_Elements...>>&
1320 get(const tuple<_Elements...>& __t) noexcept
1325 constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
1325 constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
1325 constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
1326 get(tuple<_Elements...>&& __t) noexcept
1328 typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type;
1328 typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type;
1328 typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type;
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
567 : public __is_null_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
631 : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
638 : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
638 : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
777 : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
777 : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
798 typedef decltype(__test<_Tp>(0)) type;
811 remove_all_extents<_Tp>::type>::type
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
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>
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>
1352 : public is_nothrow_assignable<_Tp&, _Tp&&>
1352 : public is_nothrow_assignable<_Tp&, _Tp&&>
1358 : public __is_nt_move_assignable_impl<_Tp>
1526 static void __test_aux(_To1);
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; };
1637 { typedef _Tp type; };
1659 { typedef _Tp&& type; };
1664 : public __add_rvalue_reference_helper<_Tp>
1955 { typedef _Tp type; };
2104 { typedef typename remove_cv<_Up>::type __type; };
2118 typedef typename remove_reference<_Tp>::type __remove_type;
2253 inline typename add_rvalue_reference<_Tp>::type
2428 std::declval<_Fn>()(std::declval<_Args>()...)
2439 typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
2452 _Functor, _ArgTypes...
2458 : public __invoke_result<_Functor, _ArgTypes...>
2574 typename remove_reference<_Tp>::type>::type>::type
2768 : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type
2802 return noexcept(std::declval<_Fn>()(std::declval<_Args>()...));
2819 : __and_<__is_invocable<_Fn, _Args...>,
2820 __call_is_nothrow_<_Fn, _Args...>>::type