[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Eric Fiselier via cfe-commits
EricWF updated this revision to Diff 74006. EricWF added a comment. Rewrite the patch entirely. Instead of using an actual "stack buffer" I've transformed `stack_allocator` into `limited_allocator` which allows at most `N` elements to be allocated from it. This resolves the issues about stack u

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. F2472251: msvc_warnings.txt - The attached patch on top of your patch fixes two simple MSVC warnings - unreferenced formal parameter and class/struct mismatch. - Three tests are emitting stack consumption warnings (since MSVC /analyz

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D25154#564980, @STL_MSFT wrote: > Seems plausible to me. I haven't tested this against MSVC yet, but at most I > expect to have minor issues with space consumption (as we allocate helper > objects and sentinel nodes, so any exactly-sized buffe

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT accepted this revision. STL_MSFT added a comment. This revision is now accepted and ready to land. Seems plausible to me. I haven't tested this against MSVC yet, but at most I expect to have minor issues with space consumption (as we allocate helper objects and sentinel nodes, so any ex

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Eric Fiselier via cfe-commits
EricWF updated this revision to Diff 73995. EricWF added a comment. Address @STL_MSFT's comments. https://reviews.llvm.org/D25154 Files: test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp.pass.cpp test/std/containers/container.adaptors/priority.queue/priqueue.co

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Eric Fiselier via cfe-commits
EricWF added a comment. > Why does test_stack_allocator.pass.cpp line 11 have a commented-out path? Typically tests name the header they test in a comment. > Why is > test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp > 84-85 gaining totally empty braces? Mass-translatio

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-03 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment. stack_allocator.h is inconsistent about saying plain size_t or std::size_t. stack_allocator.h should include type_traits for integral_constant. stack_allocator.h refers to stack_allocator as both a class and a struct. It should be consistent (not just because MSVC comp

[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-01 Thread Eric Fiselier via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, howard.hinnant, STL_MSFT. EricWF added a subscriber: cfe-commits. To quote STL the problems with stack allocator are" > "stack_allocator is seriously nonconformant to N4582 17.6.3.5 > [allocator.requirements]. > First, it lacks