[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 20:15:04 PDT 2018


Rakete1111 requested changes to this revision.
Rakete1111 added a comment.
This revision now requires changes to proceed.

Your patch breaks a lot of stuff in the test suite. For example:

  void f() {
    int A = 0;
    (A++, A) = 1; // warning from this patch, but this is perfectly valid since forever.
  }

Also, you don't take into account the fact that the rule you mention was added in C++17. In versions prior to that (and C!), the warning is not a false positive.


https://reviews.llvm.org/D50766





More information about the cfe-commits mailing list