Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / div-zero.cpp
blob063450d8883b090e9096a6139d2fa3e3ffc637fb
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -verify %s
3 int fooPR10616 (int qX ) {
4 int a, c, d;
6 d = (qX-1);
7 while ( d != 0 ) {
8 d = c - (c/d) * d;
11 return (a % (qX-1)); // expected-warning {{Division by zero}}