Ideally we want !(neg_mask || neg_char), aka (!neg_mask && !neg_char). Before the change, the code is (!neg_mask || !neg_char).
This fixes PR34310.
Differential D37955
[libcxx] Fix invert negative bracket match. timshen on Sep 16 2017, 10:05 PM. Authored by
Details
Ideally we want !(neg_mask || neg_char), aka (!neg_mask && !neg_char). Before the change, the code is (!neg_mask || !neg_char). This fixes PR34310.
Diff Detail
Event TimelineComment Actions When I applied this patch locally, some of the other tests started failing. Assertion failed: (!std::regex_match(s, m, std::regex("^[a-f]$", std::regex_constants::basic))), function main, file test/std/re/re.alg/re.alg.match/basic.pass.cpp, line 499. Assertion failed: (!std::regex_match(s, m, std::regex("^[a-f]$", std::regex_constants::extended))), function main, file test/std/re/re.alg/re.alg.match/extended.pass.cpp, line 497. Assertion failed: (!std::regex_match(s, m, std::regex("^[a-f]$"))), function main, file test/std/re/re.alg/re.alg.match/ecma.pass.cpp, line 493. Assertion failed: (!std::regex_search(s, m, std::regex("^[a-f]$", std::regex_constants::awk))), function main, file test/std/re/re.alg/re.alg.search/awk.pass.cpp, line 560. Assertion failed: (!std::regex_search(s, m, std::regex("^[a-f]$", std::regex_constants::basic))), function main, file test/std/re/re.alg/re.alg.search/basic.pass.cpp, line 562. Assertion failed: (!std::regex_search(s, m, std::regex("^[a-f]$"))), function main, file test/std/re/re.alg/re.alg.search/ecma.pass.cpp, line 553. Assertion failed: (!std::regex_search(s, m, std::regex("^[a-f]$", std::regex_constants::extended))), function main, file test/std/re/re.alg/re.alg.search/extended.pass.cpp, line 560. all now fail for me (Mac OS 10.12) Comment Actions Fixed. Those tests were XFAILing on linux-gnu. I also created D38041 to XFAIL only on the failing ones. |