Lines Matching full:left

21 // TEST NEGATIVE LEFT OPERAND
26 // expected-warning@-1 {{Left operand is negative in left shift}} in negative_left_operand_literal()
27 // expected-note@-2 {{The result of left shift is undefined because the left operand is negative}} in negative_left_operand_literal()
30 int negative_left_operand_symbolic(int left, int right) { in negative_left_operand_symbolic() argument
31 // expected-note@+2 {{Assuming 'left' is < 0}} in negative_left_operand_symbolic()
33 if (left >= 0) in negative_left_operand_symbolic()
35 return left >> right; in negative_left_operand_symbolic()
36 // expected-warning@-1 {{Left operand is negative in right shift}} in negative_left_operand_symbolic()
37 …// expected-note@-2 {{The result of right shift is undefined because the left operand is negative}} in negative_left_operand_symbolic()
46 // expected-warning@-1 {{Left operand is negative in left shift}} in negative_left_operand_compound()
47 // expected-note@-2 {{The result of left shift is undefined because the left operand is negative}} in negative_left_operand_compound()
60 // reporting the left operand after assuming that the right operand is in single_unknown_negative()
67 // then report that then the left argument must be negative. in single_unknown_negative()
69 // expected-warning@-1 {{Left operand is negative in left shift}} in single_unknown_negative()
70 // expected-note@-2 {{The result of left shift is undefined because the left operand is negative}} in single_unknown_negative()
77 // expected-warning@-1 {{Left operand is negative in left shift}} in shift_negative_by_zero()
78 // expected-note@-2 {{The result of left shift is undefined because the left operand is negative}} in shift_negative_by_zero()
81 // TEST OVERFLOW OF CONCRETE SIGNED LEFT OPERAND
132 // expected-warning@-1 {{Left shift of '1024' overflows the capacity of 'int'}} in concrete_overflow_vague()
133 …// cxx-note@-2 {{Left shift of '1024' is undefined because 'int' can hold only 32 bits (including … in concrete_overflow_vague()
134 …// c-note@-3 {{Left shift of '1024' is undefined because 'int' can hold only 31 bits (excluding th… in concrete_overflow_vague()
145 // c-warning@-1 {{Left shift of '1024' overflows the capacity of 'int'}} in concrete_overflow_vague_only_c()
146 …// c-note@-2 {{Left shift of '1024' is undefined because 'int' can hold only 31 bits (excluding th… in concrete_overflow_vague_only_c()
153 // left shifts became well-defined in C++20. in concrete_overflow_vague_left()