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

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 02:31:09 PDT 2016


rogfer01 created this revision.
rogfer01 added reviewers: EricWF, mclow.lists, rmaprath.
rogfer01 added a subscriber: cfe-commits.

This is another followup of https://reviews.llvm.org/D24562

These tests are of the form

  try {
     action-that-may-throw
     assert(!exceptional-condition)
     assert(some-other-facts)
   } catch (relevant-exception) {
     assert(exceptional-condition)
   }

Under libcpp-no-exceptions there is still value in verifying
some-other-facts while avoiding the exceptional case. So for these tests
just conditionally check some-other-facts if exceptional-condition is
false.


https://reviews.llvm.org/D26136

Files:
  test/std/strings/basic.string/string.access/at.pass.cpp
  test/std/strings/basic.string/string.capacity/reserve.pass.cpp
  test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
  test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
  test/std/strings/basic.string/string.cons/substr.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
  test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_T_size_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_pointer.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_pointer_size.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_string.pass.cpp
  test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26136.76362.patch
Type: text/x-patch
Size: 36990 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161031/ca3614b6/attachment-0001.bin>


More information about the cfe-commits mailing list