mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix a number of lint perf and safety issues in torch (#59897)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59897 Test Plan: Sandcastle Reviewed By: ngimel Differential Revision: D29037012 fbshipit-source-id: 7c16286d5fc2b67964fb65f8374dfff4d1a7aefb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a0e62c4da4
commit
b162d95e46
@ -474,8 +474,7 @@ struct Lexer {
|
||||
break;
|
||||
case TK_WHITESPACE:
|
||||
case TK_WHITESPACE_EOF: {
|
||||
int depth =
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-narrowing-conversions,bugprone-narrowing-conversions)
|
||||
const auto depth =
|
||||
r.kind == TK_WHITESPACE_EOF ? indent_stack.front() : r.range.size();
|
||||
// note: TK_WHITESPACE_EOF is whitespace right before the EOF token
|
||||
// just like we allow the code to be indented to a particular initial
|
||||
|
Reference in New Issue
Block a user