[PATCH] D49536: [Analyzer] Quick Fix for exponential execution time when simpilifying complex additive expressions

Mikhail Ramalho via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 25 18:15:13 PDT 2018


mikhail.ramalho added a comment.

> Uhm, dunno, plist/FileCheck tests are annoying. What i usually do to make sense out of them is update the tested output with the actual output and look at git diff. From that it's usually obvious what exactly happened (warnings added, warnings removed, warnings moved to a different location, intermediate diagnostics added, intermediate diagnostics removed, intermediate diagnostics moved to a different location). Could you do that and see if it makes sense or attach the diff here so that we could have a look?

The diff using Z3 is the removal of all lines inserted in `plist-macros.cpp` by this commit. I think it's a note in the first if (assuming condition is true) of:

  #define noPathNoteMacro y+y
  int macroInExpressionNoNote(int *p, int y) {
    y++;
    if (5 + noPathNoteMacro)
      if (p)
        ;
    return *p; // expected-warning {{Dereference of null pointer}}
  }

Maybe using Z3 as CM, the CSA finds the other path, where the condition is false?


Repository:
  rL LLVM

https://reviews.llvm.org/D49536





More information about the llvm-commits mailing list