summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/checkers/modernize-loop-convert.c
blob: 4c7d956c31d169b873289d267a9f669ffec24bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: clang-tidy %s -checks=-*,modernize-loop-convert -- -std=c11 | count 0

// Note: this test expects no diagnostics, but FileCheck cannot handle that,
// hence the use of | count 0.

int arr[6] = {1, 2, 3, 4, 5, 6};

void f(void) {
  for (int i = 0; i < 6; ++i) {
    (void)arr[i];
  }
}
OpenPOWER on IntegriCloud