Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: third_party/re2/re2/regexp.h

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated update instructions Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/re2/re2/re2.cc ('k') | third_party/re2/re2/regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/regexp.h
diff --git a/third_party/re2/re2/regexp.h b/third_party/re2/re2/regexp.h
index 331c017673c42574fcfff9f73ef181fe3ff0cadf..5f222b7c9f7c876088cefa5b372f3b00ff3ef306 100644
--- a/third_party/re2/re2/regexp.h
+++ b/third_party/re2/re2/regexp.h
@@ -208,10 +208,11 @@ class RegexpStatus {
StringPiece error_arg_; // Piece of regexp containing syntax error.
string* tmp_; // Temporary storage, possibly where error_arg_ is.
- DISALLOW_EVIL_CONSTRUCTORS(RegexpStatus);
+ DISALLOW_COPY_AND_ASSIGN(RegexpStatus);
};
-// Walker to implement Simplify.
+// Walkers to implement Simplify.
+class CoalesceWalker;
class SimplifyWalker;
// Compiled form; see prog.h
@@ -261,7 +262,7 @@ class CharClass {
int nrunes_;
RuneRange *ranges_;
int nranges_;
- DISALLOW_EVIL_CONSTRUCTORS(CharClass);
+ DISALLOW_COPY_AND_ASSIGN(CharClass);
};
class Regexp {
@@ -312,7 +313,7 @@ class Regexp {
// Get. No set, Regexps are logically immutable once created.
RegexpOp op() { return static_cast<RegexpOp>(op_); }
int nsub() { return nsub_; }
- bool simple() { return simple_; }
+ bool simple() { return simple_ != 0; }
enum ParseFlags parse_flags() { return static_cast<ParseFlags>(parse_flags_); }
int Ref(); // For testing.
@@ -353,6 +354,7 @@ class Regexp {
// removed. The result will capture exactly the same
// subexpressions the original did, unless formatted with ToString.
Regexp* Simplify();
+ friend class CoalesceWalker;
friend class SimplifyWalker;
// Parses the regexp src and then simplifies it and sets *dst to the
@@ -568,7 +570,7 @@ class Regexp {
void *the_union_[2]; // as big as any other element, for memset
};
- DISALLOW_EVIL_CONSTRUCTORS(Regexp);
+ DISALLOW_COPY_AND_ASSIGN(Regexp);
};
// Character class set: contains non-overlapping, non-abutting RuneRanges.
@@ -602,7 +604,7 @@ class CharClassBuilder {
uint32 lower_; // bitmap of a-z
int nrunes_;
RuneRangeSet ranges_;
- DISALLOW_EVIL_CONSTRUCTORS(CharClassBuilder);
+ DISALLOW_COPY_AND_ASSIGN(CharClassBuilder);
};
// Tell g++ that bitwise ops on ParseFlags produce ParseFlags.
« no previous file with comments | « third_party/re2/re2/re2.cc ('k') | third_party/re2/re2/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698