mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[JIT] Fix clang-tidy warnings for jit/frontend (#47982)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/47982 Test Plan: Imported from OSS Reviewed By: ZolotukhinM Differential Revision: D25258640 Pulled By: SplitInfinity fbshipit-source-id: e2cf27130311904aa5b18e3232349604d01701a0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4aa5d68874
commit
3039d24f4a
@ -202,14 +202,14 @@ struct SchemaParser {
|
||||
IValue convertToList(
|
||||
TypeKind kind,
|
||||
const SourceRange& range,
|
||||
std::vector<IValue> vs) {
|
||||
const std::vector<IValue>& vs) {
|
||||
switch (kind) {
|
||||
case TypeKind::FloatType:
|
||||
return fmap(vs, [](IValue v) { return v.toDouble(); });
|
||||
return fmap(vs, [](const IValue& v) { return v.toDouble(); });
|
||||
case TypeKind::IntType:
|
||||
return fmap(vs, [](IValue v) { return v.toInt(); });
|
||||
return fmap(vs, [](const IValue& v) { return v.toInt(); });
|
||||
case TypeKind::BoolType:
|
||||
return fmap(vs, [](IValue v) { return v.toBool(); });
|
||||
return fmap(vs, [](const IValue& v) { return v.toBool(); });
|
||||
default:
|
||||
throw ErrorReport(range)
|
||||
<< "lists are only supported for float or int types";
|
||||
@ -224,7 +224,7 @@ struct SchemaParser {
|
||||
} while (L.nextIf(','));
|
||||
}
|
||||
L.expect(']');
|
||||
return convertToList(kind, tok.range, std::move(vs));
|
||||
return convertToList(kind, tok.range, vs);
|
||||
}
|
||||
|
||||
IValue parseTensorDefault(const SourceRange& range) {
|
||||
|
Reference in New Issue
Block a user