[libcxx-commits] [PATCH] D62453: Regex backreference [3/3] Validate backreferences in the constructor.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 17 09:46:42 PDT 2019


zoecarver added inline comments.


================
Comment at: libcxx/include/regex:3554
                         unsigned __val = __traits_.value(*__temp, 10);
                         if (__val >= 1 && __val <= 9)
+                            if (__val > mark_count())
----------------
Doesn't this if statement need braces around it?


================
Comment at: libcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp:21
 
-static bool error_badbackref_thrown(const char *pat)
+static bool error_badbackref_thrown(const char *pat, std::regex::flag_type f = std::regex_constants::ECMAScript)
 {
----------------
Not an issue at all, just a small nit: the default value of `f` is never used. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62453/new/

https://reviews.llvm.org/D62453





More information about the libcxx-commits mailing list