0

I wonder if currently there is support for clang static analysis with various flows checking. For example - there is a checker to check for zero division, but can clang find a flow which a divider can evaluate to zero ? simple example: in the bellow example there is a flow (i=0) that b will evaluate to 0. do I get warning here ?

for(int i = 10; i>=0; i--){
   int a = div(i);
   ...
}

int div(int b){
   return 100000 / b;
}

if not, is there a plan to support this ?

yehudahs
  • 2,488
  • 8
  • 34
  • 54

0 Answers0