We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Regex
1 parent 49f9505 commit d1d2932Copy full SHA for d1d2932
llvm/unittests/Support/RegexTest.cpp
@@ -60,6 +60,14 @@ TEST_F(RegexTest, Basics) {
60
EXPECT_TRUE(r5.match(String));
61
}
62
63
+TEST_F(RegexTest, EmptyPattern) {
64
+ // The empty pattern doesn't match anything -- not even the empty string.
65
+ // (This is different from some other regex implementations.)
66
+ Regex r("");
67
+ EXPECT_FALSE(r.match("123"));
68
+ EXPECT_FALSE(r.match(""));
69
+}
70
+
71
TEST_F(RegexTest, Backreferences) {
72
Regex r1("([a-z]+)_\\1");
73
SmallVector<StringRef, 4> Matches;
0 commit comments