summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2019-03-28 17:30:23 +0000
committerMarshall Clow <mclow.lists@gmail.com>2019-03-28 17:30:23 +0000
commit1931c4306a38cb60ea6fbfefd238302909e57d42 (patch)
tree46b6348734f9e7c5709f2c2f03f2263a71a2e56e /libcxx/test/std
parent1dd1b5d5f254ef25dd184d71cb60db92a750d96b (diff)
downloadbcm5719-llvm-1931c4306a38cb60ea6fbfefd238302909e57d42.tar.gz
bcm5719-llvm-1931c4306a38cb60ea6fbfefd238302909e57d42.zip
Fix PR#35967: '<regex> syntax_option_type is not a proper bitmask' Sadly, this is an ABI break, so it's only available if you define either '_LIBCPP_ABI_VERSION > 2' or '_LIBCPP_ABI_UNSTABLE' or '_LIBCPP_ABI_REGEX_CONSTANTS_NONZERO' and rebuild your dylib.
llvm-svn: 357190
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp4
-rw-r--r--libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
index 49ce2b5c482..c34da53eed8 100644
--- a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
+++ b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
@@ -38,7 +38,11 @@ int main(int, char**)
assert(std::regex_constants::nosubs != 0);
assert(std::regex_constants::optimize != 0);
assert(std::regex_constants::collate != 0);
+#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO // https://bugs.llvm.org/show_bug.cgi?id=35967
+ assert(std::regex_constants::ECMAScript != 0);
+#else
assert(std::regex_constants::ECMAScript == 0);
+#endif
assert(std::regex_constants::basic != 0);
assert(std::regex_constants::extended != 0);
assert(std::regex_constants::awk != 0);
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp
index f706229e683..9705d7040ba 100644
--- a/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.construct/default.pass.cpp
@@ -21,7 +21,7 @@ void
test()
{
std::basic_regex<CharT> r;
- assert(r.flags() == 0);
+ assert(r.flags() == std::regex_constants::ECMAScript);
assert(r.mark_count() == 0);
}
OpenPOWER on IntegriCloud