NoQ added a comment.

> I feel like the 2. is a better solution. Of course, that change might have a 
> performance impact as well.

Yes, i'm all for '2.'. There's no need to make this callback more complicated 
than it already is.

As for performance, it's messy and suffers from a deeper problem: the number of 
escaped symbols is potentially infinite. The following false positive 
illustrates that well:

  void invalidate(int **x);
  
  void foo(int **x) {
    int *y = *x;
    if (*y == 0) {
      // **x should be invalidated here!
      invalidate(x);
    }
    // Should not warn about division by zero!
    1 / *y;
  }

Therefore one does not simply compose a list of escaped symbols. We need 
something similar to `SymbolReaper` but for invalidation/escapes. And //then// 
we'll talk about performance.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70470/new/

https://reviews.llvm.org/D70470



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D70470: [analyzer]... Artem Dergachev via Phabricator via cfe-commits

Reply via email to