[compiler-rt] r199736 - [Sanitizer] try harder to fix Werror build break after r199729
Alexey Samsonov
samsonov at google.com
Tue Jan 21 05:06:38 PST 2014
Author: samsonov
Date: Tue Jan 21 07:06:38 2014
New Revision: 199736
URL: http://llvm.org/viewvc/llvm-project?rev=199736&view=rev
Log:
[Sanitizer] try harder to fix Werror build break after r199729
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_format.inc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_format.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_format.inc?rev=199736&r1=199735&r2=199736&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_format.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors_format.inc Tue Jan 21 07:06:38 2014
@@ -22,24 +22,6 @@ static const char *parse_number(const ch
return p;
}
-static const char *maybe_parse_number(const char *p, int *out) {
- if (*p >= '0' && *p <= '9')
- p = parse_number(p, out);
- return p;
-}
-
-static const char *maybe_parse_number_or_star(const char *p, int *out,
- bool *star) {
- if (*p == '*') {
- *star = true;
- ++p;
- } else {
- *star = false;
- p = maybe_parse_number(p, out);
- }
- return p;
-}
-
static const char *maybe_parse_param_index(const char *p, int *out) {
// n$
if (*p >= '0' && *p <= '9') {
@@ -378,6 +360,24 @@ struct PrintfDirective {
char convSpecifier;
};
+static const char *maybe_parse_number(const char *p, int *out) {
+ if (*p >= '0' && *p <= '9')
+ p = parse_number(p, out);
+ return p;
+}
+
+static const char *maybe_parse_number_or_star(const char *p, int *out,
+ bool *star) {
+ if (*p == '*') {
+ *star = true;
+ ++p;
+ } else {
+ *star = false;
+ p = maybe_parse_number(p, out);
+ }
+ return p;
+}
+
// Parse printf format string. Same as scanf_parse_next.
static const char *printf_parse_next(const char *p, PrintfDirective *dir) {
internal_memset(dir, 0, sizeof(*dir));
More information about the llvm-commits
mailing list