This is an archive of the discontinued LLVM Phabricator instance.

[Support/Regex] Handle tabulators and escaped chars in square brackets.
AbandonedPublic

Authored by curdeius on Sep 28 2017, 7:10 AM.

Details

Summary

This patch is motivated by bug #34739 (https://bugs.llvm.org/show_bug.cgi?id=34739).
Clang-format misbehaves because escape sequence '\t' in regex is treated as literal 't'.
This patch handles escaped characters inside square brackets as well (so that somebody can write R("^[\[\]\t]") as a regex pattern).

Event Timeline

curdeius created this revision.Sep 28 2017, 7:10 AM
curdeius abandoned this revision.Nov 18 2020, 1:20 AM