/llvm-project/clang-tools-extra/test/clang-tidy/checkers/performance/ |
H A D | unnecessary-copy-initialization.cpp | 22 const ExpensiveToCopyType &reference() const; 37 using reference = T&; 50 reference at(int) const; 58 const TrivialToCopyType &reference() const; 85 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned' is copy-constructed from a const reference; consider making it a const reference [performance-unnecessary-copy-initialization] in PositiveFunctionCall() 107 // CHECK-MESSAGES: [[@LINE-1]]:14: warning: the const qualified variable 'AutoAssigned' is copy-constructed from a const reference; consider making it a const reference [performance-unnecessary-copy-initialization] in PositiveMethodCallConstReferenceParam() 128 const auto AutoAssigned = Obj.reference(); in PositiveMethodCallConstParam() 130 // CHECK-FIXES: const auto& AutoAssigned = Obj.reference(); in PositiveMethodCallConstParam() 35 using reference = T&; global() typedef [all...] |
/llvm-project/third-party/benchmark/bindings/python/google_benchmark/ |
H A D | benchmark.cc | 76 .def("unit", &Benchmark::Unit, nb::rv_policy::reference) in NB_MODULE() 77 .def("arg", &Benchmark::Arg, nb::rv_policy::reference) in NB_MODULE() 78 .def("args", &Benchmark::Args, nb::rv_policy::reference) in NB_MODULE() 79 .def("range", &Benchmark::Range, nb::rv_policy::reference, in NB_MODULE() 82 nb::rv_policy::reference, nb::arg("start"), in NB_MODULE() 84 .def("ranges", &Benchmark::Ranges, nb::rv_policy::reference) in NB_MODULE() 86 nb::rv_policy::reference) in NB_MODULE() 87 .def("arg_name", &Benchmark::ArgName, nb::rv_policy::reference) in NB_MODULE() 89 nb::rv_policy::reference) in NB_MODULE() 91 nb::rv_policy::reference, nb::arg("lo1"), nb::arg("hi1"), in NB_MODULE() [all …]
|
/llvm-project/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/ |
H A D | contiguous_iterator.compile.pass.cpp | 38 typedef int& reference; typedef 43 reference operator*() const; 61 reference operator[](difference_type n) const; 72 typedef int& reference; typedef 77 reference operator*() const; 95 reference operator[](difference_type n) const; 107 typedef int& reference; typedef 112 reference operator*() const; 130 reference operator[](difference_type n) const; 142 typedef int& reference; typedef [all …]
|
H A D | random_access_iterator.compile.pass.cpp | 36 typedef int& reference; typedef 39 reference operator*() const; 57 reference operator[](difference_type n) const; 68 typedef int& reference; typedef 71 reference operator*() const; 87 reference operator[](difference_type n) const; 100 reference operator[](difference_type n) const; 113 reference operator[](difference_type n) const; 126 reference operator[](difference_type n) const; 139 reference operator[](difference_type n) const; [all …]
|
/llvm-project/libcxx/test/std/iterators/iterator.primitives/iterator.traits/ |
H A D | empty.verify.cpp |
|
H A D | cxx20_iterator_traits.compile.pass.cpp | 61 static_assert(std::same_as<typename Traits::reference, RefType>); in test() 178 struct reference {}; struct 185 static_assert(std::same_as<AllMembersTraits::reference, AllMembers::reference>); 193 struct reference {}; struct 201 static_assert(std::same_as<NoPointerMemberTraits::reference, NoPointerMember::reference>); 209 struct reference {}; struct 218 static_assert(std::same_as<IterConceptTraits::reference, IterConcept::reference>); 225 struct reference { operator value_type() const; }; struct 228 reference operator*() const; 240 static_assert(std::same_as<LegacyInputTraits::reference, LegacyInput::reference>); [all …]
|
/llvm-project/openmp/docs/openacc/ |
H A D | OpenMPExtensions.rst | 68 construct. As usual, the standard OpenMP reference count for the 92 * LLVM uses the term *dynamic reference count* for the standard OpenMP 93 reference count for host/device data mappings. 94 * The ``ompx_hold`` map type modifier selects an alternate reference 95 count, called the *hold reference count*. 96 * A mapping is removed only once both its reference counts reach zero. 98 decrements of the hold reference count are guaranteed to be 100 * The dynamic reference count is used wherever ``ompx_hold`` is not 102 dynamic reference count has no effect if it is already zero. 105 hold reference count is greater than zero. [all …]
|
/llvm-project/llvm/test/DebugInfo/PDB/Native/ |
H A D | pdb-native-pointers.test | 48 ; CHECK-NEXT: reference: 0 60 ; CHECK-NEXT: reference: 0 72 ; CHECK-NEXT: reference: 1 84 ; CHECK-NEXT: reference: 0 96 ; CHECK-NEXT: reference: 0 108 ; CHECK-NEXT: reference: 0 120 ; CHECK-NEXT: reference: 0 132 ; CHECK-NEXT: reference: 0 144 ; CHECK-NEXT: reference: 0 156 ; CHECK-NEXT: reference: 0 [all …]
|
/llvm-project/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/ |
H A D | types.pass.cpp | 39 using reference = char&; typedef 59 static_assert(std::is_same_v<typename std::reverse_iterator<FooIter>::reference, bool&>); 62 static_assert(std::is_same<typename std::reverse_iterator<FooIter>::reference, char&>::value, ""); 71 typedef Reference reference; typedef 86 static_assert((std::is_same_v<typename R::reference, std::iter_rvalue_reference_t<It>>), ""); in test() 88 static_assert((std::is_same<typename R::reference, typename R::value_type&&>::value), ""); in test() 121 static_assert(std::is_same<It::reference, int>::value, ""); in main() 126 static_assert(std::is_same<It::reference, std::reference_wrapper<int> >::value, ""); in main() 133 static_assert(std::is_same<It::reference, long>::value, ""); in main() 138 static_assert(std::is_same<It::reference, int&&>::value, ""); in main() [all …]
|
/llvm-project/libcxx/test/std/containers/sequences/array/ |
H A D | indexing.pass.cpp | 26 ASSERT_SAME_TYPE(C::reference, decltype(c[0])); in tests() 27 C::reference r1 = c[0]; in tests() 32 C::reference r2 = c[2]; in tests() 45 ASSERT_SAME_TYPE(C::reference, decltype(c[0])); in tests() 47 C::reference r = c[0]; in tests() 56 ASSERT_SAME_TYPE(C::reference, decltype(c[0])); in tests() 58 C::reference r = c[0]; in tests()
|
H A D | front_back.pass.cpp | 26 C::reference r1 = c.front(); in tests() 31 C::reference r2 = c.back(); in tests() 40 ASSERT_SAME_TYPE(decltype(c.back()), C::reference); in tests() 42 ASSERT_SAME_TYPE(decltype(c.front()), C::reference); in tests() 53 ASSERT_SAME_TYPE(decltype( c.back()), C::reference); in tests() 55 ASSERT_SAME_TYPE(decltype( c.front()), C::reference); in tests()
|
/llvm-project/libcxx/test/libcxx/algorithms/ |
H A D | robust_against_using_non_transparent_comparators.pass.cpp | 22 struct reference { argument 25 reference(T* ptr) : ptr_(ptr) {} 27 friend bool operator<(reference a, reference b) { return *a.ptr_ < *b.ptr_; } in operator <() 28 friend bool operator<(reference a, value_type const& b) { return *a.ptr_ < b; } in operator <() 29 friend bool operator<(value_type const& a, reference b) { return a < *b.ptr_; } 48 reference operator*() const { return reference(ptr_); } 21 struct reference { global() struct 24 referenceIterator::reference reference() argument
|
/llvm-project/libcxx/test/std/iterators/predef.iterators/iterators.common/ |
H A D | types.h | 28 typedef typename std::iterator_traits<It>::reference reference; typedef 35 constexpr reference operator*() const {return *it_;} 52 typedef typename std::iterator_traits<It>::reference reference; typedef 76 typedef typename std::iterator_traits<It>::reference reference; typedef 109 typedef typename std::iterator_traits<It>::reference reference; typedef 132 typedef typename std::iterator_traits<It>::reference reference; typedef 139 constexpr reference operator*() const {return *it_;} 194 typedef typename std::iterator_traits<It>::reference reference; typedef 204 constexpr reference operator*() const {return *it_;} 244 typedef typename std::iterator_traits<It>::reference reference; typedef [all …]
|
/llvm-project/lld/test/COFF/ |
H A D | lto-lazy-reference.ll | 2 …i686-pc-windows-msvc -filetype=obj -o %T/lto-lazy-reference-quadruple.obj %S/Inputs/lto-lazy-refer… 3 ; RUN: llvm-as -o %T/lto-lazy-reference-dummy.bc %S/Inputs/lto-lazy-reference-dummy.ll 5 ; RUN: llvm-ar cru %t.lib %T/lto-lazy-reference-quadruple.obj %T/lto-lazy-reference-dummy.bc 19 ; lazy definition in the lib file from lto-lazy-reference-quadruple.obj. This 21 ; reference, because that can bring in new references to bitcode files after 22 ; LTO, such as lto-lazy-reference-dummy.bc in this case.
|
/llvm-project/libcxx/test/std/containers/views/mdspan/mdspan/ |
H A D | CustomTestAccessors.h | 79 using reference = ElementType&; 89 constexpr reference access(data_handle_type p, size_t i) const noexcept { in access() 107 using reference = double&; 118 constexpr reference access(data_handle_type p, size_t i) const noexcept { 133 using reference = unsigned; 140 constexpr reference access(data_handle_type p, size_t i) const noexcept { 154 using reference = unsigned; 164 constexpr reference access(data_handle_type p, size_t i) const noexcept { 179 using reference = const float&; 188 constexpr reference acces 78 using reference = ElementType&; global() member [all...] |
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
H A D | move-forwarding-reference.rst | 1 .. title:: clang-tidy - bugprone-move-forwarding-reference 3 bugprone-move-forwarding-reference 6 Warns if ``std::move`` is called on a forwarding reference, for example: 20 (A forwarding reference is an rvalue reference of a type that is a deduced 33 ``T&&`` will always end up being an rvalue reference, no matter what type is 49 that take an rvalue reference argument of a type that is a deduced function 53 deduced to be an lvalue reference. In the example, ``T`` is deduced to be 55 ``std::string& &&``; by the reference collapsing rules, this collapses to 58 This means that the ``foo(s)`` call passes ``s`` as an lvalue reference, and
|
/llvm-project/llvm/test/MC/MachO/ |
H A D | symbol-flags.s | 3 .reference sym_ref_A 4 .reference sym_ref_def_A 7 .reference sym_ref_def_C 8 .reference sym_ref_def_D 11 .reference sym_ref_def_E 55 .reference sym_ref_A
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/readability/ |
H A D | reference-to-constructed-temporary.rst | 1 .. title:: clang-tidy - readability-reference-to-constructed-temporary 3 readability-reference-to-constructed-temporary 6 Detects C++ code where a reference variable is used to extend the lifetime of 23 In the first example, a ``const std::string&`` reference variable ``str`` is 25 constructor. In the second example, a ``const Point&`` reference variable ``p`` 28 lifetime of the reference variable, which can make it difficult to reason about 31 To avoid these issues, it is recommended to change the reference variable to a
|
/llvm-project/llvm/test/Integer/ |
H A D | constpointer_bt.ll | 13 @t3 = global i40 * @t1 ;; Forward reference 15 @t4 = global i40 ** @t3 ;; reference to reference 19 @0 = global float * @2 ;; Forward numeric reference 20 @1 = global float * @2 ;; Duplicate forward numeric reference 22 @3 = global float * @2 ;; Numeric reference
|
/llvm-project/llvm/test/Feature/ |
H A D | constpointer.ll | 13 @t3 = global ptr @t1 ;; Forward reference 15 @t4 = global ptr @t3 ;; reference to reference 19 @0 = global ptr @2 ;; Forward numeric reference 20 @1 = global ptr @2 ;; Duplicate forward numeric reference 22 @3 = global ptr @2 ;; Numeric reference
|
/llvm-project/libcxx/test/libcxx/ranges/range.utility.helpers/ |
H A D | has_arrow.compile.pass.cpp | 23 typedef int& reference; 25 reference operator*() const; 42 typedef int& reference; 44 /* reference operator*() const; */ 61 typedef int& reference; 63 reference operator*() const; 22 typedef int& reference; global() typedef 41 typedef int& reference; global() typedef 60 typedef int& reference; global() typedef
|
/llvm-project/clang/test/CodeGenObjC/ |
H A D | protocols-lazy.m | 11 // Definition triggered by protocol reference. 17 // Forward definition triggered by protocol reference. 26 // Definition triggered by class reference. 33 // Definition following forward reference. 38 // reference, which has to be 48 // Protocol reference following definition.
|
/llvm-project/clang/test/SemaCXX/ |
H A D | ignored-reference-qualifiers-disabled.cpp | 13 … qual-warning{{'volatile' qualifier on reference type 'IntRef' (aka 'int &') has no effect}} 18 using reference = value_type&; typedef in container 19 reference get(); 20 …const reference get() const; // qual-warning{{'const' qualifier on reference type 'reference' (aka…
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/ |
H A D | rvalue-reference-param-not-moved.rst | 1 .. title:: clang-tidy - cppcoreguidelines-rvalue-reference-param-not-moved 3 cppcoreguidelines-rvalue-reference-param-not-moved 6 Warns when an rvalue reference function parameter is never moved within 9 Rvalue reference parameters indicate a parameter that should be moved with 56 If set to `true`, the check ignores unnamed rvalue reference parameters. 62 reference parameters. Default is `false`. 68 // Below, 'T' is not deduced and 'T&&' is an rvalue reference type. 76 // Never flagged, since 'T' is a forwarding reference in a deduced context
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/performance/ |
H A D | unnecessary-copy-initialization.rst | 8 const reference. 11 reference. This is the case when the variable is const qualified or when it is 13 it is used as const reference or value argument in constructors or function 22 // The warning will suggest making this a const reference. 30 // The warning will suggest making this a const reference. 34 // The warning will suggest making this a const reference. 46 every type with suffix ``Ref``, ``ref``, ``Reference`` and ``reference``. 54 return the const reference the variable is copied from. When an expensive to
|