[libcxx-commits] [libcxx] [regex] fix uncaught exception when string is like "\\_" (PR #129348)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 6 05:07:43 PST 2025


================
@@ -1305,6 +1305,12 @@ int main(int, char**)
         assert(m.position(0) == 0);
         assert(m.str(0) == s);
     }
+    {
+      std::cmatch m;
+      const char s[] = "$_se";
+      assert(std::regex_match(s, m, std::regex("\\$\\_se")));
+      assert(m.size() == 1);
+    }
----------------
Zhenhang1213 wrote:

Thanks for advice, I am so sorry for asking it again. I changed my test case and add `// XFAIL: FROZEN-CXX03-HEADERS-FIXME`, however the CI  still error, I don't think the reason is my code, could you help me more? 

https://github.com/llvm/llvm-project/pull/129348


More information about the libcxx-commits mailing list