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

Mateusz Janek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 11 12:38:58 PDT 2018


stryku marked an inline comment as done.
stryku added inline comments.


================
Comment at: test/SemaCXX/warn-unsequenced-cxx17.cpp:1
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 -Wno-unused %s
+
----------------
lebedev.ri wrote:
> Rakete1111 wrote:
> > lebedev.ri wrote:
> > > One last-minute thought: this is only a positive test.
> > > You don't test what happens before C++17.
> > It is tested. Look at the diff for test/SemaCXX/warn-unsequenced.cpp :)
> > Or are you suggesting to merge the two files?
> I see that the negative test is in `warn-unsequenced.cpp`, but the positive test is in `warn-unsequenced-cxx17.cpp`.
> This split is the reason of my remark.
> I'm not sure if this is an issue, or if merging them is the solution.
Like I said in some of the previous comments, merging these files, AFAIU, would introduce a little ifdefing. With other sequence-related topics from p0145 there would be a lot more ifdefing introduced, and IMHO the file would be a lot less readable. That's why I've introduced this file for C++17+.


https://reviews.llvm.org/D50766





More information about the cfe-commits mailing list