projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eaef89b
)
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator...
author
Marshall Clow
<mclow@qualcomm.com>
Fri, 22 Mar 2013 02:13:55 +0000
(
02:13
+0000)
committer
Marshall Clow
<mclow@qualcomm.com>
Fri, 22 Mar 2013 02:13:55 +0000
(
02:13
+0000)
llvm-svn: 177693
libcxx/include/regex
patch
|
blob
|
history
diff --git
a/libcxx/include/regex
b/libcxx/include/regex
index
1156a3e
..
d1afa54
100644
(file)
--- a/
libcxx/include/regex
+++ b/
libcxx/include/regex
@@
-764,7
+764,7
@@
_LIBCPP_CONSTEXPR
syntax_option_type
operator~(syntax_option_type __x)
{
- return syntax_option_type(~int(__x));
+ return syntax_option_type(~int(__x)
& 0x1FF
);
}
inline _LIBCPP_INLINE_VISIBILITY
@@
-840,7
+840,7
@@
_LIBCPP_CONSTEXPR
match_flag_type
operator~(match_flag_type __x)
{
- return match_flag_type(~int(__x));
+ return match_flag_type(~int(__x)
& 0x0FFF
);
}
inline _LIBCPP_INLINE_VISIBILITY