Home
last modified time | relevance | path

Searched refs:lvalue (Results 1 – 25 of 86) sorted by relevance

1234

/llvm-project-15.0.7/clang/test/CXX/over/over.match/over.match.funcs/
H A Dp4-0x.cpp3 template<typename T> T &lvalue();
30 void lvalue() &; // expected-note 2 {{'lvalue' declared here}}
52 int &ir1 = lvalue<X0>().f(); in test_ref_qualifier_binding()
55 int &ir2 = lvalue<X0>().ft(1); in test_ref_qualifier_binding()
61 int &ir1 = lvalue<X0>()(); in test_ref_qualifier_binding_with_surrogates()
67 int &ir1 = lvalue<X0>() + prvalue<X0>(); in test_ref_qualifier_binding_operators()
70 int &ir2 = lvalue<X0>() + 1; in test_ref_qualifier_binding_operators()
76 int &ir1 = lvalue<X0>().h(); in test_ref_qualifier_overloading()
79 int &ir2 = lvalue<X0>().h2(); in test_ref_qualifier_overloading()
94 lvalue<X0>().lvalue(); in test_diagnostics()
[all …]
/llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector/vector.modifiers/
H A Dinsert_iter_lvalue.pass.cpp26 const int lvalue = 1; in test() local
27 std::vector<int>::iterator i = v.insert(v.cbegin() + 10, lvalue); in test()
42 const int lvalue = 1; in test() local
45 std::vector<int>::iterator it = v.insert(v.cbegin() + n, lvalue); in test()
53 assert(v[n] == lvalue); in test()
59 const int lvalue = 1; in test() local
60 std::vector<int>::iterator i = v.insert(v.cbegin() + 10, lvalue); in test()
76 const int lvalue = 1; in test() local
77 std::vector<int>::iterator i = v.insert(v.cbegin() + 10, lvalue); in test()
90 const int lvalue = 1; in test() local
[all …]
/llvm-project-15.0.7/clang/test/CXX/expr/expr.post/expr.static.cast/
H A Dp3-p4-0x.cpp17 template<typename T> T& lvalue();
24 A &&ar2 = static_cast<A&&>(lvalue<C>()); in test()
27 A &&ar5 = static_cast<A&&>(lvalue<D>()); in test()
32 …A &&ar9 = static_cast<A&&>(lvalue<const A>()); // expected-error {{cannot cast from lvalue of typ… in test()
37 const A &&ar13 = static_cast<const A&&>(lvalue<C>()); in test()
40 const A &&ar16 = static_cast<const A&&>(lvalue<D>()); in test()
H A Dp3-0x.cpp9 template<typename T> T& lvalue();
15 A &&ar2 = static_cast<A&&>(lvalue<A>()); in test()
16 A &&ar3 = static_cast<A&&>(lvalue<B>()); in test()
21 const A &&ar8 = static_cast<const A&&>(lvalue<A>()); in test()
22 const A &&ar9 = static_cast<const A&&>(lvalue<B>()); in test()
/llvm-project-15.0.7/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/
H A Dp5-0x.cpp7 template<typename T> T& lvalue();
216 …int & ir1 = (lvalue<IntBitfield>().i); // expected-error{{non-const reference cannot bind to bit-f… in test()
219 int && ir4 = move(lvalue<IntBitfield>()).i; // no-warning in test()
221 …volatile int & vir1 = (lvalue<IntBitfield>().i); // expected-error{{non-const reference cannot bin… in test()
224 volatile int && vir4 = move(lvalue<IntBitfield>()).i; // no-warning in test()
226 const int & cir1 = (lvalue<IntBitfield>().i); // no-warning in test()
229 const int && cir4 = move(lvalue<IntBitfield>()).i; // no-warning in test()
231 …const volatile int & cvir1 = (lvalue<IntBitfield>().i); // expected-error{{non-const reference can… in test()
234 const volatile int && cvir4 = move(lvalue<IntBitfield>()).i; // no-warning in test()
/llvm-project-15.0.7/clang/test/CXX/expr/expr.mptr.oper/
H A Dp6-0x.cpp5 template<typename T> T& lvalue();
18 (lvalue<X>().*pmf)(17); in test()
24 (lvalue<X>().*l_pmf)(17); in test()
30 …(lvalue<X>().*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{… in test()
/llvm-project-15.0.7/clang/test/AST/HLSL/
H A Dvector-constructors.hlsl30 // CHECK-NEXT: ArraySubscriptExpr 0x{{[0-9a-fA-F]+}} <col:24, <invalid sloc>> 'float' lvalue
34 // CHECK-NEXT: ArraySubscriptExpr 0x{{[0-9a-fA-F]+}} <col:24, <invalid sloc>> 'float' lvalue
61 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'float' lvalue Var 0x{{[0-9a-fA-F]+}} 'f' '…
63 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:27> 'float' lvalue Var 0x{{[0-9a-fA-F]+}} 'g' '…
85 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'int' lvalue Var 0x{{[0-9a-fA-F]+}} 'i' 'int'
88 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:27> 'int' lvalue Var 0x{{[0-9a-fA-F]+}} 'j' 'int'
98 // CHECK-NEXT: MemberExpr 0x{{[0-9a-fA-F]+}} <col:24, col:26> 'float' lvalue .f 0x{{[0-9a-fA-F]+}}
99 // CHECK-NEXT: DeclRefExpr 0x{{[0-9a-fA-F]+}} <col:24> 'struct S':'S' lvalue Var 0x{{[0-9a-fA-F]+}}…
101 // CHECK-NEXT: MemberExpr 0x{{[0-9a-fA-F]+}} <col:29, col:31> 'float' lvalue .f 0x{{[0-9a-fA-F]+}}
116 // CHECK-NEXT: ImplicitCastExpr 0x{{[0-9a-fA-F]+}} <col:24> 'const T' lvalue <NoOp>
[all …]
/llvm-project-15.0.7/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/
H A Dp3-0x.cpp45 template<typename T> T& lvalue();
50 X<int&> xi2 = f0(lvalue<int>()); in test_f0()
53 X<Y&> xy2 = f0(lvalue<Y>()); in test_f0()
62 f1(lvalue<int>()); // expected-error{{no matching function for call to 'f1'}} in test_f1()
65 f1(lvalue<Y>()); // expected-error{{no matching function for call to 'f1'}} in test_f1()
/llvm-project-15.0.7/clang/test/OpenMP/
H A Dtarget_update_codegen.cpp354 void lvalue(int *B, int l, int e) { in lvalue() function
396 void lvalue(int *B, int l, int e) { in lvalue() function
443 void lvalue(int *B, int l, int e) { in lvalue() function
493 void lvalue(int **B, int l, int e) { in lvalue() function
548 void lvalue(struct S *s, int l, int e) { in lvalue() function
597 void lvalue(struct S *s, int l, int e) { in lvalue() function
646 void lvalue(struct S *s, int l, int e) { in lvalue() function
697 void lvalue(struct S *s, int l, int e) { in lvalue() function
755 void lvalue(int **BB, int a, int b) { in lvalue() function
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dconstant-expression-cxx1z.cpp65 template<typename T> struct lvalue { struct
134 SEQ(B(lvalue<int>().get()) = A(0));
135 SEQ(B(lvalue<UserDefined>().get()) = A(ud));
136 SEQ(B(lvalue<int>().get()) += A(0));
137 SEQ(B(lvalue<UserDefined>().get()) += A(ud));
138 SEQ(B(lvalue<NonMember>().get()) += A(nm));
H A Dexpression-traits.cpp364 Class lvalue; in expr_ref_4() local
365 ASSERT_LVALUE(lvalue.dataMember); in expr_ref_4()
379 ASSERT_RVALUE(lvalue.Enumerator); in expr_ref_4()
506 Class lvalue; in expr_mptr_oper() local
507 ASSERT_LVALUE(lvalue.*(&Class::dataMember)); in expr_mptr_oper()
514 ASSERT_LVALUE((&lvalue)->*(&Class::dataMember)); in expr_mptr_oper()
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/misc/
H A Dthrow-by-value-catch-by-reference.cpp40 logic_error lvalue("lvalue"); in testThrowFunc() local
41 throw lvalue; in testThrowFunc()
44 throw move(lvalue); in testThrowFunc()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGAtomic.cpp46 assert(!lvalue.isGlobalReg()); in AtomicInfo()
48 if (lvalue.isSimple()) { in AtomicInfo()
49 AtomicTy = lvalue.getType(); in AtomicInfo()
74 LVal = lvalue; in AtomicInfo()
76 ValueTy = lvalue.getType(); in AtomicInfo()
86 lvalue.getAlignment(); in AtomicInfo()
97 BFI, lvalue.getType(), lvalue.getBaseInfo(), in AtomicInfo()
112 AtomicTy = lvalue.getType(); in AtomicInfo()
115 LVal = lvalue; in AtomicInfo()
118 ValueTy = lvalue.getType(); in AtomicInfo()
[all …]
H A DCGExprComplex.cpp349 ComplexPairTy ComplexExprEmitter::EmitLoadOfLValue(LValue lvalue, in EmitLoadOfLValue() argument
351 assert(lvalue.isSimple() && "non-simple complex l-value?"); in EmitLoadOfLValue()
352 if (lvalue.getType()->isAtomicType()) in EmitLoadOfLValue()
353 return CGF.EmitAtomicLoad(lvalue, loc).getComplexVal(); in EmitLoadOfLValue()
355 Address SrcPtr = lvalue.getAddress(CGF); in EmitLoadOfLValue()
356 bool isVolatile = lvalue.isVolatileQualified(); in EmitLoadOfLValue()
377 if (lvalue.getType()->isAtomicType() || in EmitStoreOfComplex()
378 (!isInit && CGF.LValueIsSuitableForInlineAtomic(lvalue))) in EmitStoreOfComplex()
381 Address Ptr = lvalue.getAddress(CGF); in EmitStoreOfComplex()
382 Address RealPtr = CGF.emitAddrOfRealComponent(Ptr, lvalue.getType()); in EmitStoreOfComplex()
[all …]
H A DCGDecl.cpp748 LValue &lvalue, in drillIntoBlockVariable() argument
750 lvalue.setAddress(CGF.emitBlockByrefAddress(lvalue.getAddress(CGF), var)); in drillIntoBlockVariable()
781 EmitNullabilityCheck(lvalue, value, init->getExprLoc()); in EmitScalarInit()
782 EmitStoreThroughLValue(RValue::get(value), lvalue, true); in EmitScalarInit()
804 LValue tempLV = lvalue; in EmitScalarInit()
865 EmitARCInitWeak(lvalue.getAddress(*this), value); in EmitScalarInit()
876 EmitNullabilityCheck(lvalue, value, init->getExprLoc()); in EmitScalarInit()
1941 EmitStoreThroughLValue(rvalue, lvalue, true); in EmitExprAsInit()
1946 EmitScalarInit(init, D, lvalue, capturedByInit); in EmitExprAsInit()
1952 EmitStoreOfComplex(complex, lvalue, /*init*/ true); in EmitExprAsInit()
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/DeadStoreElimination/
H A D2011-09-06-EndOfFunction.ll11 %temp.lvalue = alloca %"class.std::auto_ptr", align 8
12 call void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr") %temp.lvalue)
13 …%_M_ptr.i.i = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %temp.lvalue,…
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dmove-forwarding-reference.rst34 deduced for ``T``, and that it is therefore not possible to pass an lvalue to
52 If ``foo()`` is called on an lvalue (as in the example above), then ``T`` is
53 deduced to be an lvalue reference. In the example, ``T`` is deduced to be
58 This means that the ``foo(s)`` call passes ``s`` as an lvalue reference, and
/llvm-project-15.0.7/llvm/test/CodeGen/X86/
H A Dinalloca-invoke.ll15 %temp.lvalue = alloca %Iter
28 call void @begin(ptr sret(%Iter) %temp.lvalue)
31 invoke void @plus(ptr sret(%Iter) %end, ptr %temp.lvalue, i32 4)
/llvm-project-15.0.7/llvm/test/Transforms/MemCpyOpt/
H A Dloadstore-sret.ll20 %temp.lvalue = alloca %"class.std::auto_ptr", align 8
21 call void @_Z3barv(%"class.std::auto_ptr"* sret(%"class.std::auto_ptr") %temp.lvalue)
22 …%tmp.i.i = getelementptr inbounds %"class.std::auto_ptr", %"class.std::auto_ptr"* %temp.lvalue, i6…
/llvm-project-15.0.7/clang/test/SemaObjCXX/
H A Dclass-method-self.mm20 … // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
22 …; // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
H A Dinstancetype.mm146 …ected-error{{cannot initialize return object of type 'Subclass4 *' with an lvalue of type 'Class'}}
169 …ted-error{{cannot initialize return object of type 'Subclass2 *' with an lvalue of type 'Subclass1…
174 …ted-error{{cannot initialize return object of type 'Subclass2 *' with an lvalue of type 'Subclass1…
205 …return _b; // expected-error {{cannot initialize return object of type 'A4 *' with an lvalue of ty…
208 …return _b; // expected-error {{cannot initialize return object of type 'A4 *' with an lvalue of ty…
/llvm-project-15.0.7/clang/test/Analysis/
H A Dlive-stmts.mm57 // CHECK-NEXT: `-DeclRefExpr {{.*}} 'Collection *' lvalue ParmVar {{.*}} 'coll' 'Collection *'
63 // CHECK-NEXT: `-DeclRefExpr {{.*}} 'Collection *' lvalue ParmVar {{.*}} 'coll' 'Collection *'
69 // CHECK-NEXT: `-DeclRefExpr {{.*}} 'Collection *' lvalue ParmVar {{.*}} 'coll' 'Collection *'
/llvm-project-15.0.7/clang/test/SemaObjC/
H A Dforeach.m9 for ((id)2 in a); /* expected-error{{selector element is not a valid lvalue}} */
10 for (2 in a); /* expected-error{{selector element is not a valid lvalue}} */
55 for (obj.prop in collection) { /* expected-error {{selector element is not a valid lvalue}} */
/llvm-project-15.0.7/libcxx/test/libcxx/algorithms/
H A Ddebug_less.pass.cpp232 int lvalue = 42; in test_value_categories() local
235 assert(dl(lvalue, const_lvalue)); in test_value_categories()
236 assert(dl(/*rvalue*/1, lvalue)); in test_value_categories()
/llvm-project-15.0.7/clang/test/AST/
H A Dast-dump-recovery.cpp272 int &lvalue(int);
278 lvalue(); // call to a function (lvalue reference return type) yields an lvalue. in ValueCategory()

1234