Re: [PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-06-05 Thread Billy O'Neal via cfe-commits
But I actually want the predicate count assertions turned on -- if a user
turns off iterator debugging they need to get exactly what the standard
asks for, and that means both predicate assertions like this and the
Iterator Debug Array Overloads go away.

I need to figure out how to do this with our test harness though, since at
the moment we depend on that forceinclude.

Billy3

On Mon, Jun 5, 2017 at 9:51 AM, David Blaikie  wrote:

> Alternatively, you could disable the check (or change the count it checks)
> if this is defined. (& if you disable the check when this is defined, you
> could change an existing build/test config (or add a new one) to have this
> disabled)
>
> On Tue, May 30, 2017 at 8:19 PM Billy Robert O'Neal III via Phabricator
> via cfe-commits  wrote:
>
>> BillyONeal abandoned this revision.
>> BillyONeal added a comment.
>>
>> Stephan pointed out that the force include breaks this. Backing it out
>> for now :(
>>
>>
>> https://reviews.llvm.org/D33708
>>
>>
>>
>> ___
>> cfe-commits mailing list
>> cfe-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-06-05 Thread David Blaikie via cfe-commits
Alternatively, you could disable the check (or change the count it checks)
if this is defined. (& if you disable the check when this is defined, you
could change an existing build/test config (or add a new one) to have this
disabled)

On Tue, May 30, 2017 at 8:19 PM Billy Robert O'Neal III via Phabricator via
cfe-commits  wrote:

> BillyONeal abandoned this revision.
> BillyONeal added a comment.
>
> Stephan pointed out that the force include breaks this. Backing it out for
> now :(
>
>
> https://reviews.llvm.org/D33708
>
>
>
> ___
> cfe-commits mailing list
> cfe-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-05-30 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal abandoned this revision.
BillyONeal added a comment.

Stephan pointed out that the force include breaks this. Backing it out for now 
:(


https://reviews.llvm.org/D33708



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-05-30 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision.

Turn off MSVC++'s comp(a, b) implies !comp(b, a) assertion in tests that are 
checking for predicate counts.

There should be no functionality change for libcxx as it does not look for the 
_ITERATOR_DEBUG_LEVEL macro.

While this assert is technically out of contract because the standard specifies 
exact operation counts for these algorithms, in practice users using !less t
o implement greater is a fairly common mistake, and this assert turns out to be 
highly compatible. Note also that in the inplace_merge case, users can't even 
rely on exact application counts here, so the complexity bound is probably 
overspecified in the standard.


https://reviews.llvm.org/D33708

Files:
  
test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
  test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp


Index: 
test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
===
--- test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
+++ test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
@@ -17,6 +17,10 @@
 //
 //  Complexity: At most (3/2) * t.size() applications of the corresponding 
predicate.
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 
Index: test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
===
--- test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -15,6 +15,10 @@
 //   void
 //   inplace_merge(Iter first, Iter middle, Iter last, Compare comp);
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 
Index: 
test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
===
--- 
test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
+++ 
test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
@@ -14,6 +14,10 @@
 //   void
 //   make_heap(Iter first, Iter last, Compare comp);
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 


Index: test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
===
--- test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
+++ test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
@@ -17,6 +17,10 @@
 //
 //  Complexity: At most (3/2) * t.size() applications of the corresponding predicate.
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 
Index: test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
===
--- test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -15,6 +15,10 @@
 //   void
 //   inplace_merge(Iter first, Iter middle, Iter last, Compare comp);
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 
Index: test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
===
--- test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
+++ test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
@@ -14,6 +14,10 @@
 //   void
 //   make_heap(Iter first, Iter last, Compare comp);
 
+// Disable MSVC++'s "comp(a, b) implies !comp(b, a)" assertion:
+#undef _ITERATOR_DEBUG_LEVEL
+#define _ITERATOR_DEBUG_LEVEL 0
+
 #include 
 #include 
 #include 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits