Home
last modified time | relevance | path

Searched full:division (Results 1 – 25 of 717) sorted by relevance

12345678910>>...29

/llvm-project/clang/test/Analysis/
H A Dtest-after-div-zero.c7 var = 77 / x; // expected-note {{Division with compared value made here}} in err_eq()
8 …0) { } // expected-warning {{Value being compared against zero has already been used for division}} in err_eq()
9 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_eq()
12 var = 77 / x; // expected-note {{Division with compared value made here}} in err_eq2()
13 …x) { } // expected-warning {{Value being compared against zero has already been used for division}} in err_eq2()
14 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_eq2()
17 var = 77 / x; // expected-note {{Division with compared value made here}} in err_ne()
18 …0) { } // expected-warning {{Value being compared against zero has already been used for division}} in err_ne()
19 } // expected-note@-1 {{Value being compared against zero has already been used for division}} in err_ne()
22 var = 77 / x; // expected-note {{Division with compared value made here}} in err_ge()
[all …]
H A Ddivision-by-zero-track-zero.cpp10 return 1 / div; // expected-note {{Division by zero}} \ in f()
11 // expected-warning {{Division by zero}} in f()
20 return 1 / div; // expected-note {{Division by zero}} \ in f()
21 // expected-warning {{Division by zero}} in f()
30 return 1 / div; // expected-note {{Division by zero}} \ in f()
31 // expected-warning {{Division by zero}} in f()
42 return 1 / div; // expected-note {{Division by zero}} \ in f()
43 // expected-warning {{Division by zero}} in f()
54 return 1 / div; // expected-note {{Division by zero}} \ in f()
55 // expected-warning {{Division by zero}} in f()
[all …]
H A Dstd-c-library-functions-arg-constraints-note-tags.cpp26 return 1 / y; // expected-warning{{Division by zero}} \ in test_not_null_note()
27 // expected-note{{Division by zero}} in test_not_null_note()
36 return y / x; // expected-warning{{Division by zero}} \ in test_range_constraint_note()
37 // expected-note{{Division by zero}} in test_range_constraint_note()
58 return y / x; // expected-warning{{Division by zero}} \ in test_case_note_1()
59 // expected-note{{Division by zero}} in test_case_note_1()
64 return y / (x - 1); // expected-warning{{Division by zero}} \ in test_case_note_2()
65 // expected-note{{Division by zero}} in test_case_note_2()
H A Dloop-widening-notes.cpp38 return flag_b / num; // no-crash expected-warning {{Division by zero}} in while_analyzer_output()
39 // expected-note@-1 {{Division by zero}} in while_analyzer_output()
52 local = 10 / num; // no-crash expected-warning {{Division by zero}} in do_while_analyzer_output()
53 // expected-note@-1 {{Division by zero}} in do_while_analyzer_output()
70 return flag_d / num; // no-crash expected-warning {{Division by zero}} in test_for_loop()
71 // expected-note@-1 {{Division by zero}} in test_for_loop()
81 return 1/arr[0]; // expected-warning {{Division by zero}} in test_for_range_loop()
82 // expected-note@-1 {{Division by zero}} in test_for_range_loop()
H A Dnon-diagnosable-assumptions.c21 // expected-warning@-1{{Division by zero}} in test_true()
22 // expected-note@-2{{Division by zero}} in test_true()
32 // expected-warning@-1{{Division by zero}} in test_false()
33 // expected-note@-2{{Division by zero}} in test_false()
44 // expected-warning@-1{{Division by zero}} in test_exclamation_mark()
45 // expected-note@-2{{Division by zero}} in test_exclamation_mark()
H A Dtest-include.c12 int res = DIVXY(1,0); // expected-warning{{Division by zero}} in test_02()
13 // expected-warning@-1{{division by zero is undefined}} in test_02()
18 int res = DIVYX(0,1); // expected-warning{{Division by zero}} in test_03()
19 // expected-warning@-1{{division by zero is undefined}} in test_03()
H A Dcast-value-notes.cpp172 // expected-note@-2 {{Division by zero}} in evalNonNullParamNonNullReturnReference()
173 // expected-warning@-3 {{Division by zero}} in evalNonNullParamNonNullReturnReference()
230 // expected-note@-2 {{Division by zero}} in evalNonNullParamNonNullReturn()
231 // expected-warning@-3 {{Division by zero}} in evalNonNullParamNonNullReturn()
247 // expected-note@-2 {{Division by zero}} in evalNonNullParamNullReturn()
248 // expected-warning@-3 {{Division by zero}} in evalNonNullParamNullReturn()
258 // expected-note@-1 {{Division by zero}} in evalNullParamNullReturn()
259 // expected-warning@-2 {{Division by zero}} in evalNullParamNullReturn()
269 // expected-note@-2 {{Division by zero}} in evalZeroParamNonNullReturnPointer()
270 // expected-warning@-3 {{Division by zero}} in evalZeroParamNonNullReturnPointer()
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dinteger-division.cpp1 // RUN: %check_clang_tidy %s bugprone-integer-division %t
13 // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: result of integer division used in in singleDiv()
18 // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: result of integer division used in in wrongOrder()
45 // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: result of integer division used in in m()
60 // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: result of integer division used in in integerDivision()
65 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: result of integer division used in in integerDivision()
67 // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: result of integer division used in in integerDivision()
70 // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: result of integer division used in in integerDivision()
72 // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: result of integer division used in in integerDivision()
74 // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: result of integer division used in in integerDivision()
[all …]
/llvm-project/mlir/include/mlir/Analysis/Presburger/
H A DUtils.h108 /// Class storing division representation of local variables of a constraint
112 /// of the division has no meaning and the denominator is zero. If it has a
115 /// The i^th division here, represents the division representation of the
127 // Get the offset from where division variables start.
130 // Check whether the `i^th` division has a division representation or not.
132 // Check whether all the divisions have a division representation or not.
135 // Clear the division representation of the i^th local variable.
138 // Get the dividend of the `i^th` division in getDividend()
[all...]
/llvm-project/clang/test/SemaCXX/
H A Dconstexpr-frame-describe.cpp6 expected-warning {{division by zero}} \
7 expected-note 2{{division by zero}}
13 return 1 / 0; // expected-warning {{division by zero}} \ in operator ==()
14 expected-note 3{{division by zero}} in operator ==()
40 expected-warning {{division by zero}} \
41 expected-note 2{{division by zero}}
65 constexpr int fail1() const { return 1 / 0; } // expected-warning {{division by zero}} \ in fail1()
66 // expected-note {{division by zero}}
68 constexpr int fail2() const { return 1 / 0; } // expected-warning {{division by zero}} \ in fail2()
69 // expected-note {{division by zero}}
[all …]
H A Dwarn-div-or-rem-by-zero.cpp6 (void)(42 / 0); // expected-warning{{division by zero is undefined}} in div()
7 (void)(42 / false); // expected-warning{{division by zero is undefined}} in div()
8 (void)(42 / !1); // expected-warning{{division by zero is undefined}} in div()
9 (void)(42 / (1 - 1)); // expected-warning{{division by zero is undefined}} in div()
10 (void)(42 / !(1 + 1)); // expected-warning{{division by zero is undefined}} in div()
11 (void)(42 / (int)(0.0)); // expected-warning{{division by zero is undefined}} in div()
/llvm-project/llvm/test/CodeGen/AVR/
H A Ddiv.ll3 ; Unsigned 8-bit division
13 ; Signed 8-bit division
23 ; Unsigned 16-bit division
33 ; Signed 16-bit division
43 ; Unsigned 32-bit division
54 ; Signed 32-bit division
65 ; Unsigned 64-bit division
74 ; Signed 64-bit division
83 ; Unsigned 128-bit division
92 ; Signed 128-bit division
[all...]
/llvm-project/clang/test/Analysis/inlining/
H A DDynDispatchBifurcate.m81 return 5/[p getZero];// expected-warning {{Division by zero}}
90 return 5/m; // expected-warning {{Division by zero}}
109 return 5/value; // expected-warning {{Division by zero}}
114 return 5/p.value; // expected-warning {{Division by zero}}
121 return 5/[p value]; // expected-warning {{Division by zero}}
132 return 5/[p getZeroPublic];// expected-warning {{Division by zero}}
145 return 5/m; // expected-warning {{Division by zero}}
146 return 5/[p getZeroPublic];// expected-warning {{Division by zero}}
155 return 5/m; // expected-warning {{Division by zero}}
156 return 5/[p getZeroPublic];// expected-warning {{Division by zero}}
[all …]
H A Dtemp-dtors-path-notes.cpp9 ~C() { x = 1 / x; } // expected-warning{{Division by zero}} in ~C()
10 // expected-note@-1{{Division by zero}}
28 ~C() { x = 1 / x; } // expected-warning{{Division by zero}} in ~C()
29 // expected-note@-1{{Division by zero}}
56 glob = 1 / glob; // expected-warning{{Division by zero}} in test()
57 // expected-note@-1{{Division by zero}} in test()
H A DInlineObjCInstanceMethod.m37 return 5/y; // expected-warning {{Division by zero}}
43 return 5/[a getInt]; // expected-warning {{Division by zero}}
49 return 5/[a getInt]; // expected-warning {{Division by zero}}
54 return 5/[a getInt]; // expected-warning {{Division by zero}}
74 return 5/_attribute; // expected-warning {{Division by zero}}
95 return 5/_attribute; // expected-warning {{Division by zero}}
/llvm-project/mlir/lib/Analysis/Presburger/
H A DUtils.cpp29 /// Normalize a division's `dividend` and the `divisor` by their GCD. For
43 // For a division: in normalizeDivisionByGCD()
48 // influence the result of the floor division and thus, can be ignored. in normalizeDivisionByGCD()
61 /// Check if the pos^th variable can be represented as a division using upper
84 /// strictly tighter than the division bounds described above, since tighter
85 /// bounds imply the division bounds. For example:
96 /// If successful, `expr` is set to dividend of the division and `divisor` is
97 /// set to the denominator of the division, which will be positive.
98 /// The final division expression is normalized by GCD.
138 // The inequality pair can be used to extract the division in getDivRepr()
[all...]
/llvm-project/flang/test/Semantics/
H A Dresolve37.f9028 !WARNING: INTEGER(4) division by zero
31 !WARNING: INTEGER(4) division by zero
33 !WARNING: INTEGER(4) division by zero
34 !WARNING: INTEGER(4) division by zero
35 !WARNING: INTEGER(4) division by zero
42 !WARNING: INTEGER(4) division by zero
46 !WARNING: INTEGER(4) division by zero
/llvm-project/llvm/test/Analysis/Lint/
H A Dcheck-zero-divide.ll24 ; CHECK: Undefined behavior: Division by zero
31 ; CHECK: Undefined behavior: Division by zero
38 ; CHECK: Undefined behavior: Division by zero
45 ; CHECK: Undefined behavior: Division by zero
52 ; CHECK: Undefined behavior: Division by zero
59 ; CHECK: Undefined behavior: Division by zero
66 ; CHECK: Undefined behavior: Division by zero
73 ; CHECK: Undefined behavior: Division by zero
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/abseil/
H A Dduration-division.rst1 .. title:: clang-tidy - abseil-duration-division
3 abseil-duration-division
7 division of two ``absl::Duration`` objects returns an ``int64`` with any fractional
16 int64 sec2 = absl::ToInt64Seconds(d); // Equivalent to division.
22 If you want floating-point division, you should use either the
34 This check looks for uses of ``absl::Duration`` division that is done in a
/llvm-project/llvm/test/MC/RISCV/
H A Drv32zmmul-invaild.s4 # CHECK-ERROR: 5:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
7 # CHECK-ERROR: 8:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
10 # CHECK-ERROR: 11:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
13 # CHECK-ERROR: 14:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
H A Drv64zmmul-invalid.s4 # CHECK-ERROR: 5:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
7 # CHECK-ERROR: 8:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
10 # CHECK-ERROR: 11:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
13 # CHECK-ERROR: 14:1: error: instruction requires the following: 'M' (Integer Multiplication and Division){{$}}
/llvm-project/llvm/test/CodeGen/SystemZ/
H A Dvec-div-01.ll1 ; Test vector division. There is no native integer support for this,
6 ; Test a v16i8 division.
29 ; Test a v8i16 division.
44 ; Test a v4i32 division.
55 ; Test a v2i64 division.
64 ; Test a v2f64 division.
74 ; Test an f64 division that uses vector registers.
/llvm-project/flang/test/Evaluate/
H A Dfolding03.f9015 ! Integer division by zero are not tested here because they are handled as fatal
60 !WARN: warning: INTEGER(4) division overflowed
79 !WARN: warning: invalid argument on division
82 !WARN: warning: division by zero
84 !WARN: warning: division by zero
163 !WARN: warning: overflow on division
165 !WARN: warning: overflow on division
182 !WARN: warning: invalid argument on division
185 !WARN: warning: invalid argument on division
188 !WARN: warning: invalid argument on division
[all …]
/llvm-project/llvm/test/Transforms/LoopVectorize/
H A Dpr38697.ll27 ; No explicit division appears in the input, but a division is generated during
28 ; vectorization, and that division is a division-by-0 when the input 'count'
102 ; // Division is loop invariant, and denominator is guaranteed non-zero:
114 ; division from the inner loop to the preheader.
175 ; and so it is illegal to hoist the division because if 'start1' is 0, hoisting
234 ; This version is has a clearly safe division by a non-zero constant (16). The
235 ; division is transformed to a logical-shift-right of 4, and it is safely
238 ; Verify that the division-operation is hoisted, and that it appears as a
239 ; right-shift ('lshr') rather than an explicit division.
296 ; This version is has a clearly safe division by a non-zero constant (17). The
[all …]
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dinteger-division.rst1 .. title:: clang-tidy - bugprone-integer-division
3 bugprone-integer-division
6 Finds cases where integer division in a floating point context is likely to
31 // OK, no integer division.

12345678910>>...29