Commit ed5176ba authored by thakis's avatar thakis Committed by Commit bot

re2: Merge upstream 2225f94df8ec

BUG=411648
TBR=hans@chromium.org

Review URL: https://codereview.chromium.org/548083002

Cr-Commit-Position: refs/heads/master@{#293652}
parent d8b17a82
...@@ -27,5 +27,7 @@ Local Modifications (to be applied in this order): ...@@ -27,5 +27,7 @@ Local Modifications (to be applied in this order):
for this (https://code.google.com/p/re2/issues/detail?id=77) which is rendered for this (https://code.google.com/p/re2/issues/detail?id=77) which is rendered
ineffective by patches/remove-valgrind-code.patch ineffective by patches/remove-valgrind-code.patch
(patches/re2-msan.patch) (patches/re2-msan.patch)
- Remove comparisons of this with NULL (patches/this-null.patch), sent upstream - Remove comparisons of this with NULL (patches/this-null.patch), merges
at https://codereview.appspot.com/107100043/ upstream b92ce81f1e25
- Let COMPILE_ASSERT use static_assert if available, merges upstream
2225f94df8ec
...@@ -711,7 +711,10 @@ Examples: ...@@ -711,7 +711,10 @@ Examples:
''' '''
def promptyesno(ui, msg): def promptyesno(ui, msg):
return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 if hgversion >= "2.7":
return ui.promptchoice(msg + " $$ &yes $$ &no", 0) == 0
else:
return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0
def promptremove(ui, repo, f): def promptremove(ui, repo, f):
if promptyesno(ui, "hg remove %s (y/n)?" % (f,)): if promptyesno(ui, "hg remove %s (y/n)?" % (f,)):
...@@ -2609,7 +2612,7 @@ def RietveldSetup(ui, repo): ...@@ -2609,7 +2612,7 @@ def RietveldSetup(ui, repo):
rpc = None rpc = None
global releaseBranch global releaseBranch
tags = repo.branchtags().keys() tags = repo.branchmap().keys()
if 'release-branch.go10' in tags: if 'release-branch.go10' in tags:
# NOTE(rsc): This tags.sort is going to get the wrong # NOTE(rsc): This tags.sort is going to get the wrong
# answer when comparing release-branch.go9 with # answer when comparing release-branch.go9 with
......
...@@ -79,9 +79,13 @@ typedef unsigned int uint; ...@@ -79,9 +79,13 @@ typedef unsigned int uint;
typedef unsigned short ushort; typedef unsigned short ushort;
// COMPILE_ASSERT causes a compile error about msg if expr is not true. // COMPILE_ASSERT causes a compile error about msg if expr is not true.
#if __cplusplus >= 201103L
#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
#else
template<bool> struct CompileAssert {}; template<bool> struct CompileAssert {};
#define COMPILE_ASSERT(expr, msg) \ #define COMPILE_ASSERT(expr, msg) \
typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
#endif
// DISALLOW_EVIL_CONSTRUCTORS disallows the copy and operator= functions. // DISALLOW_EVIL_CONSTRUCTORS disallows the copy and operator= functions.
// It goes in the private: declarations in a class. // It goes in the private: declarations in a class.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment