path sensitive vs context sensitive

Hello!

I believe that Clang has "path sensitive" analysis. I wonder why it is not technically "context sensitive"? Clang analyzes function calls.

int div(int x) {
  return 100/x; // <- warning: Division by zero
}

int main() {
  div(0); // <- change "0" to "10" and no warning is written.
  return 0;
}

What criteria for "context sensitive" is it that clang does not fulfill?

I have always claimed that Cppcheck has context sensitive analysis because it detects such bug. If that is wrong I'd like to know it, and why.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden

Mobile: +46 (0)709 12 42 62
E-mail: Daniel.Marjamaki@evidente.se

www.evidente.se

Hello Daniel,

CSA _is_ context-sensitive.

28.04.2017 16:09, Daniel Marjamäki via cfe-dev пишет: