mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-02 06:24:59 +08:00
[5/N] Fix clang-tidy warnings in jit (#131969)
Follows #131903 Pull Request resolved: https://github.com/pytorch/pytorch/pull/131969 Approved by: https://github.com/ezyang
This commit is contained in:
@ -263,8 +263,7 @@ struct ParserImpl {
|
||||
}
|
||||
Expr parseExp(int precedence) {
|
||||
TreeRef prefix;
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
int unary_prec;
|
||||
int unary_prec = 0;
|
||||
if (shared.isUnary(L.cur().kind, &unary_prec)) {
|
||||
auto kind = L.cur().kind;
|
||||
auto pos = L.cur().range;
|
||||
@ -283,8 +282,7 @@ struct ParserImpl {
|
||||
} else {
|
||||
prefix = parseBaseExp();
|
||||
}
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
int binary_prec;
|
||||
int binary_prec = 0;
|
||||
while (shared.isBinary(L.cur().kind, &binary_prec)) {
|
||||
if (binary_prec <= precedence) // not allowed to parse something which is
|
||||
// not greater than 'precedence'
|
||||
|
||||
Reference in New Issue
Block a user