You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/bugprone/infinite-loop.cpp
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -852,3 +852,64 @@ void structured_binding_in_template_instantiation(int b) {
852
852
structured_binding_in_template_bylref(b, 0);
853
853
structured_binding_in_template_byrref(b, 0);
854
854
}
855
+
856
+
voidarray_structured_binding() {
857
+
int arr[2] = {0, 0};
858
+
auto [x, y] = arr;
859
+
860
+
while (x < 10) {
861
+
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: this loop is infinite; none of its condition variables (x) are updated in the loop body [bugprone-infinite-loop]
0 commit comments