http://llvm.org/bugs/show_bug.cgi?id=18514

            Bug ID: 18514
           Summary: regex doesn't use regex_traits::value() to parse
                    quantifiers and backreferences
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Per C++ 28.13[re.grammar]/13, "Where the regular expression grammar requires
the conversion of a sequence of characters to an integral value, this is
accomplished by calling traits_inst.value."

Per ECMA-262, Quantifier includes DecimalDigits and DecimalEscape includes
DecimalIntegerLiteral, both of which are sequences of characters that are
converted to integral values.

in libc++, basic_regex::__parse_DUP_COUNT obtains the value of a quantifier by
executing *__first - '0', and basic_regex::__parse_BACKREF obtains its value by
executing *__temp - '0'.
(the \u and \x escapes, however, do call __traits_.value() as expected)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to