Paul Wankadia has uploaded this change for review.
Attempt to address some `-Wunreachable-code` warnings.
Fixes #384.
Change-Id: Ic78c6330716ed4c1ece8b064fc57ee960fdfa4ab
---
M re2/compile.cc
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/re2/compile.cc b/re2/compile.cc
index b519957..aa79887 100644
--- a/re2/compile.cc
+++ b/re2/compile.cc
@@ -790,8 +790,8 @@
// Should not be called.
Frag Compiler::Copy(Frag arg) {
// We're using WalkExponential; there should be no copying.
- LOG(DFATAL) << "Compiler::Copy called!";
failed_ = true;
+ LOG(DFATAL) << "Compiler::Copy called!";
return NoMatch();
}
@@ -917,8 +917,8 @@
CharClass* cc = re->cc();
if (cc->empty()) {
// This can't happen.
- LOG(DFATAL) << "No ranges in char class";
failed_ = true;
+ LOG(DFATAL) << "No ranges in char class";
return NoMatch();
}
@@ -975,8 +975,8 @@
case kRegexpNoWordBoundary:
return EmptyWidth(kEmptyNonWordBoundary);
}
- LOG(DFATAL) << "Missing case in Compiler: " << re->op();
failed_ = true;
+ LOG(DFATAL) << "Missing case in Compiler: " << re->op();
return NoMatch();
}
To view, visit change 60351. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Paul Wankadia.
Patch set 1:Code-Review +1
Patch set 1:Code-Review +2
Paul Wankadia submitted this change.
Attempt to address some `-Wunreachable-code` warnings.
Fixes #384.
Change-Id: Ic78c6330716ed4c1ece8b064fc57ee960fdfa4ab
Reviewed-on: https://code-review.googlesource.com/c/re2/+/60351
Reviewed-by: Perry Lorier <per...@google.com>
Reviewed-by: Paul Wankadia <jun...@google.com>
---
M re2/compile.cc
1 file changed, 17 insertions(+), 3 deletions(-)
To view, visit change 60351. To unsubscribe, or for help writing mail filters, visit settings.