mclow.lists added a comment.

I had no idea that we had no tests for `vector::clear`. Oosps.

This looks good to me, but I want to play with the codegen for a bit before 
approving it.
Also, you should add `cfe-commits` to the subscribers.

thanks for doing this!



> clear.pass.cpp:25
> +    c.clear();
> +    assert(c.empty());
> +    }

How about a couple more assertions here:

  LIBCPP_ASSERT(c.__invariants());`
  LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));

> clear.pass.cpp:32
> +    c.clear();
> +    assert(c.empty());
> +    }

Same here.

Repository:
  rL LLVM

https://reviews.llvm.org/D25241



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

Reply via email to