forked from OSchip/llvm-project
[Sanitizer] try harder to fix Werror build break after r199729
llvm-svn: 199736
This commit is contained in:
parent
39dbd7cc2c
commit
8c03475f01
|
@ -22,24 +22,6 @@ static const char *parse_number(const char *p, int *out) {
|
|||
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));
|
||||
|
|
Loading…
Reference in New Issue