[PATCH] D26136: Protect exceptional path under libcpp-no-exceptions

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 07:37:59 PDT 2016


mclow.lists accepted this revision.
mclow.lists added a comment.
This revision is now accepted and ready to land.

Thanks for making these changes; I think this looks much better than before.
Feature creep: A bunch of the local variables can be marked as `const`.



================
Comment at: test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp:27
 {
     typename S::size_type old_size = s.size();
     S s0 = s;
----------------
Nit. `old_size` should be `const`
(and in a few other places)


================
Comment at: test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp:34
     typename S::size_type old_size = s.size();
     S s0 = s;
+    if (pos1 <= old_size && pos2 <= sv.size())
----------------
`s0` should be `const`, too.


https://reviews.llvm.org/D26136





More information about the cfe-commits mailing list