NoQ added a comment.

Here are some examples:

  void test1(int *a, int index1, int index2) {
    int x = a[index1];
    a[index2] = 0;
    int y = a[index1];
  
    // In reality we don't know but after your patch
    // we're confident that this is "TRUE".
    clang_analyzer_eval(x == y);
  }
  
  void foo(int *a); // Potentially modifies elements of 'a'.
  
  void test2(int *a, int index) {
    int x = a[index];
    foo(a);
    int y = a[index];
  
    // In reality we don't know but after your patch
    // we're confident that this is "TRUE".
    clang_analyzer_eval(x == y);
  }


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

https://reviews.llvm.org/D81254



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

Reply via email to