Created
May 9, 2018 06:52
-
-
Save goldsborough/354b2f93c4e0b819fdc68c4633c9b221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/optimizers.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/serialization.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/torch.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/detail.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/module.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/conv.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/modules.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/functional.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/batchnorm.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/linear.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/dropout.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/embedding.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/containers.h. Compile command not found. | |
Skipping /home/psag/pytorch/pytorch/torch/csrc/api/include/torch/nn/modules/rnn.h. Compile command not found. | |
34583 warnings generated. | |
66798 warnings generated. | |
99917 warnings generated. | |
133643 warnings generated. | |
166647 warnings generated. | |
199650 warnings generated. | |
232654 warnings generated. | |
265717 warnings generated. | |
298795 warnings generated. | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: warning: Use of memory after it is freed [clang-analyzer-cplusplus.NewDelete] | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:26:5: note: Taking false branch | |
if (!grad.defined()) | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:30:5: note: Taking false branch | |
if (weight_decay_ > 0) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:34:5: note: Taking true branch | |
if (momentum_ != 0) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:36:7: note: Taking false branch | |
if (momentum_buffers_.find(name) == momentum_buffers_.end()) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:44:11: note: Assuming the condition is false | |
if (nesterov_) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:44:7: note: Taking false branch | |
if (nesterov_) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:49:5: note: Calling implicit destructor for 'Tensor' | |
} | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:49:5: note: Calling '~TensorBase' | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:29:5: note: Taking true branch | |
if (pImpl != UndefinedTensor::singleton()) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Calling 'Retainable::release' | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/Retainable.h:15:5: note: Taking true branch | |
if(--refcount == 0) { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/Retainable.h:16:7: note: Memory is released | |
delete this; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Returning; memory was released | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:49:5: note: Returning from '~TensorBase' | |
} | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:49:5: note: Returning from destructor for 'Tensor' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:52:3: note: Calling implicit destructor for 'Tensor' | |
} | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:52:3: note: Calling '~TensorBase' | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:29:5: note: Taking true branch | |
if (pImpl != UndefinedTensor::singleton()) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Use of memory after it is freed | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [hicpp-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [hicpp-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [google-readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [hicpp-noexcept-move] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [cert-dcl59-cpp] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <torch/nn/module.h> | |
^ ~~~~~~~~~~~~~~~~~~~ | |
"torch/detail.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:12:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
OptimizerImpl(std::shared_ptr<nn::Module> model) : model_(model) {} | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:12:17: warning: pass by value and use std::move [modernize-pass-by-value] | |
OptimizerImpl(std::shared_ptr<nn::Module> model) : model_(model) {} | |
^ ~~~~~~ | |
std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:21:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
OptimizerImpl() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:28:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Optimizer_CRTP(std::shared_ptr<nn::Module> model) : OptimizerImpl(model) {} | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:36:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Optimizer_CRTP() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:58:3: warning: constructor does not initialize these fields: lr_ [hicpp-member-init] | |
SGD() {} | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:58:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
SGD() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:80:3: warning: constructor does not initialize these fields: lr_ [hicpp-member-init] | |
Adagrad() {} | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:80:3: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] | |
Adagrad() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:108:3: warning: constructor does not initialize these fields: lr_ [cppcoreguidelines-pro-type-member-init] | |
RMSprop() {} | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:108:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
RMSprop() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:137:3: warning: constructor does not initialize these fields: lr_ [hicpp-member-init] | |
Adam() {} | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/optimizers.h:137:3: warning: use '= default' to define a trivial default constructor [modernize-use-equals-default] | |
Adam() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/optimizers.cpp:106:11: warning: implicit conversion 'double' -> bool [readability-implicit-bool-conversion] | |
if (momentum_) { | |
^ ~ | |
!= 0.0 | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [hicpp-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [hicpp-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [google-readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [hicpp-noexcept-move] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/module.h:30:37: warning: all parameters should be named in a function [readability-named-parameter] | |
Variable& param(std::string const&); | |
^ | |
/*name*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/module.h:68:34: warning: all parameters should be named in a function [readability-named-parameter] | |
std::shared_ptr<nn::Module>, | |
^ | |
/*m*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/module.h:71:25: warning: all parameters should be named in a function [readability-named-parameter] | |
Variable& add(Variable, std::string const&); | |
^ ~ | |
/*v*/ /*name*/ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/module.cpp:121:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else | |
^~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: warning: Use of memory after it is freed [clang-analyzer-cplusplus.NewDelete] | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:321:7: note: Assuming the condition is true | |
if (inputs.size() > 1) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:321:3: note: Taking true branch | |
if (inputs.size() > 1) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:328:17: note: Assuming the condition is true | |
auto output = at::cudnn_is_acceptable(inp[0]) && dropout_ == 0 | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:328:17: note: Left side of '&&' is true | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:328:17: note: '?' condition is true | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:329:9: note: Calling 'RNNBase::CUDNN_forward' | |
? CUDNN_forward(inp) | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:255:22: note: Assuming the condition is false | |
for (size_t i = 0; i < nlayers_; i++) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:255:3: note: Loop condition is false. Execution continues on line 263 | |
for (size_t i = 0; i < nlayers_; i++) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:263:25: note: Assuming the condition is false | |
auto weight_stride0 = no_bias_ ? 2 : 4; | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:263:25: note: '?' condition is false | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:267:3: note: Taking false branch | |
if (!inputs[1].defined()) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:273:10: note: Assuming the condition is false | |
hx = mode_ == RNNMode::LSTM ? inputs[1][0] : inputs[1]; | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:273:10: note: '?' condition is false | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:274:10: note: '?' condition is false | |
cx = mode_ == RNNMode::LSTM ? inputs[1][1] : Variable(); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:283:3: note: Taking true branch | |
if (weight_data_ptrs != data_ptrs_) { | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:310:21: note: Assuming the condition is false | |
Variable hidout = mode_ == RNNMode::LSTM | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:310:21: note: '?' condition is false | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for 'Variable' | |
return variable_list({output, hidout}); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for 'Tensor' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling '~TensorBase' | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:29:5: note: Taking true branch | |
if (pImpl != UndefinedTensor::singleton()) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Calling 'Retainable::release' | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/Retainable.h:15:5: note: Taking true branch | |
if(--refcount == 0) { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/Retainable.h:16:7: note: Memory is released | |
delete this; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Returning; memory was released | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Returning from '~TensorBase' | |
return variable_list({output, hidout}); | |
^ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Returning from destructor for 'Tensor' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Returning from destructor for 'Variable' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for 'tuple' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for '_Tuple_impl' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for '_Head_base' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling implicit destructor for 'Tensor' | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:314:40: note: Calling '~TensorBase' | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:29:5: note: Taking true branch | |
if (pImpl != UndefinedTensor::singleton()) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/TensorBase.h:30:7: note: Use of memory after it is freed | |
pImpl->release(); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [hicpp-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [hicpp-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [google-readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [hicpp-noexcept-move] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [cert-dcl59-cpp] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:13:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Dropout(double p = 0.5) : p_(p) { | |
^~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:16:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*unused*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Dropout2d(double p = 0.5) : p_(p) { | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:27:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*unused*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/linear.h:15:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*unused*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:18:3: warning: constructor does not initialize these fields: gate_size_ [hicpp-member-init] | |
RNNBase(uint32_t input_size, uint32_t hidden_size) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:28:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:56:44: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list CUDNN_forward(variable_list); | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:57:47: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list autograd_forward(variable_list); | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:59:43: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list cell_forward(variable_list, int); | |
^ ~ | |
/*inputs*/ /*i*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:60:48: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list LSTM_cell_forward(variable_list, int); | |
^ ~ | |
/*inputs*/ /*i*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:61:47: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list GRU_cell_forward(variable_list, int); | |
^ ~ | |
/*inputs*/ /*i*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:62:52: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list RNN_RELU_cell_forward(variable_list, int); | |
^ ~ | |
/*inputs*/ /*i*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/rnn.h:63:52: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list RNN_TANH_cell_forward(variable_list, int); | |
^ ~ | |
/*inputs*/ /*i*/ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:149:3: warning: do not use 'else' after 'return' [readability-else-after-return] | |
else if (mode_ == RNNMode::GRU) | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/torch/csrc/api/src/nn/modules/rnn.cpp:281:5: warning: 'emplace_back' is called inside a loop; consider pre-allocating the vector capacity before the loop [performance-inefficient-vector-operation] | |
weight_data_ptrs.emplace_back(p.second.data().data_ptr()); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/batchnorm.h:12:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
BatchNorm(uint32_t num_features) : num_features_(num_features) {} | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/batchnorm.h:20:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/embedding.h:15:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*input*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/linear.h:15:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*input*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:13:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Dropout(double p = 0.5) : p_(p) { | |
^~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:16:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Dropout2d(double p = 0.5) : p_(p) { | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/dropout.h:27:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*inputs*/ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <exception> | |
^ ~~~~~~~~~~~ | |
"THP_export.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:11:25: warning: pass by value and use std::move [modernize-pass-by-value] | |
explicit assert_error(const std::string& msg) : msg(msg) {} | |
^~~~~~~~~~~~~~~~~~ ~~~~ | |
std::string std::move() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:12:23: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual const char* what() const noexcept { return msg.c_str(); } | |
~~~~~~~~~~~~~~ ^ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<functional> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/engine.h:33:25: warning: default arguments on virtual or override methods are prohibited [google-default-arguments] | |
virtual variable_list execute( | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function.h:318:8: warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] | |
bool is_traceable() final override { | |
^ ~~~~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:13:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPreHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/function_hook.h:18:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~FunctionPostHook() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/grad_mode.h:17:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AutoGradMode(bool enabled) : prev_mode(GradMode::is_enabled()) { | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/input_buffer.h:8:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:6:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <thread> | |
^ ~~~~~~~~ | |
"ATen/ATen.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:190:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:202:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/profiler.h:214:5: warning: do not use 'else' after 'throw' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/saved_variable.h:21:7: warning: constructor does not initialize these fields: saved_version_, output_nr_, requires_grad_, has_grad_fn_ [hicpp-member-init] | |
class SavedVariable { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:121:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor const& rhs) : at::Tensor(rhs) { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:127:16: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
/*implicit*/ Variable(at::Tensor&& rhs) noexcept | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:186:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:292:11: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [hicpp-use-override] | |
virtual ~Impl(); | |
~~~~~~~~^ ~ | |
override | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable.h:392:38: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::shared_ptr<Function>& get_grad_fn() override; | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/autograd/variable_version.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
VariableVersion(uint32_t version = 0) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^ | |
note: this fix will not be applied because it overlaps with another fix | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:24:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
AttributeValue(Symbol name) | |
^~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:30:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~AttributeValue() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:37:37: warning: pass by value and use std::move [modernize-pass-by-value] | |
ScalarAttributeValue(Symbol name, ConstructorType value_) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:42:15: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual Ptr clone() const override { | |
~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:45:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:59:25: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual AttributeKind kind() const override { return Kind; } | |
~~~~~~~~~~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:60:43: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::unique_ptr<AttributeValue> clone() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:90:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual const char* what() const noexcept override { | |
~~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:103:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default] | |
Attributes() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/attributes.h:197:5: warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto] | |
T* child = dynamic_cast<T*>(it->get()); | |
^~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:57:3: warning: overloaded 'operator++' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator++(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/graph_node_list.h:67:3: warning: overloaded 'operator--' returns a non-constant object instead of a constant object type [cert-dcl21-cpp] | |
generic_graph_node_list_iterator operator--(int) { | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
const | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:2:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<algorithm> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:3:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead [hicpp-deprecated-headers] | |
#include <stdint.h> | |
^~~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:177:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef uint32_t unique_t; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using unique_t = uint32_t | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/interned_strings.h:217:13: warning: 'operator unsigned int' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
constexpr operator unique_t() const { | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:20:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"ATen/ArrayRef.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:55:15: warning: redundant 'operator<<' declaration [readability-redundant-declaration] | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:258:15: note: previously declared here | |
std::ostream& operator<<(std::ostream & out, const Type & t); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:113:15: warning: use nullptr [modernize-use-nullptr] | |
parent_ = NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:124:20: warning: use nullptr [modernize-use-nullptr] | |
if (parent_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:130:23: warning: use nullptr [modernize-use-nullptr] | |
return parent_ == NULL; | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:134:12: warning: implicit conversion 'torch::jit::Scope *' -> bool [readability-implicit-bool-conversion] | |
while (current->parent_) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:7: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:150:69: warning: string concatenation results in allocation of unnecessary temporary strings; consider using 'operator+=' or 'string::append()' instead [performance-inefficient-string-concatenation] | |
out = std::string(parent->name_.toUnqualString()) + separator + out; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:203:12: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty] | |
return unique_name_ != ""; | |
^~~~~~~~~~~~~~~~~~~ | |
!unique_name_.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:331:19: warning: use nullptr [modernize-use-nullptr] | |
if (scope_ == NULL) { | |
^~~~~ | |
nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:366:10: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(o->uses().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!o->uses().empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:649:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Node() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:728:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:731:12: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] | |
return const_graph_node_list(output_, kNextDirection); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ | |
{ } | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:845:9: warning: pass by value and use std::move [modernize-pass-by-value] | |
Graph(std::shared_ptr<Scope> scope_root) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:972:5: warning: use auto when initializing with a template cast to avoid duplicating the type name [hicpp-use-auto] | |
TupleType* tt = v->type()->expect<TupleType>(); | |
^~~~~~~~~~ | |
auto | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1093:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Node * n) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1100:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
WithInsertPoint(Block * b) | |
^~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1160:14: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
JIT_ASSERT(outputs_[i]->uses().size() == 0); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
outputs_[i]->uses().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:50:20: note: expanded from macro 'JIT_ASSERT' | |
#define JIT_ASSERT TORCH_ASSERT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:27:22: note: expanded from macro 'TORCH_ASSERT' | |
if (TORCH_EXPECT(!(cond), 0)) { \ | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/assertions.h:21:47: note: expanded from macro 'TORCH_EXPECT' | |
#define TORCH_EXPECT(x, y) (__builtin_expect((x), (y))) | |
^ | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/stl_vector.h:743:7: note: method 'vector<torch::jit::Use, std::allocator<torch::jit::Use> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1182:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(outputs().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~~ | |
!outputs().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Value *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1184:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
while(blocks().size() > 0) | |
^~~~~~~~~~~~~~~~~~~~ | |
!blocks().empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<torch::jit::Block *>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: constructor does not initialize these fields: tracing_autograd_python_function [cppcoreguidelines-pro-type-member-init] | |
PythonOp(Graph * graph) | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1269:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
PythonOp(Graph * graph) | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1284:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1309:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual void cloneFrom(Node * other_) override; | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1330:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
CppOp(Graph * g) | |
^~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1341:18: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual Node * allocNewInstance(Graph * g) override { | |
~~~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/ir.h:1344:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void cloneFrom(Node * other_) override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/resource_guard.h:11:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
ResourceGuard(std::function<void()> destructor) | |
^~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:20:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(additional.size() != 0) { | |
^~~~~~~~~~~~~~~~~~~~~~~ | |
!additional.empty() | |
/opt/rh/devtoolset-4/root/usr/lib/gcc/x86_64-redhat-linux/5.2.1/../../../../include/c++/5.2.1/bits/basic_string.h:3217:7: note: method 'basic_string<char, std::char_traits<char>, std::allocator<char> >'::empty() defined here | |
empty() const _GLIBCXX_NOEXCEPT | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:31:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
StringSourceLocation(std::string context) | |
^~~~~~~~~~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/source_location.h:33:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual void highlight(std::ostream & out) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/ir.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:14:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<cstdint> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:41:7: warning: do not use 'else' after 'continue' [readability-else-after-return] | |
} else if (ts == state) { | |
^~~~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:51:5: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:77:5: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
IntListTrace(int size) | |
^~~~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:191:7: warning: implicit conversion 'torch::jit::Value *' -> bool [readability-implicit-bool-conversion] | |
if (vts->trace) return vts->trace; | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:206:8: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (!vts) { | |
~^~~~ | |
== nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/tracer.h:229:9: warning: implicit conversion 'torch::jit::tracer::ValueTracingStateElem *' -> bool [readability-implicit-bool-conversion] | |
if (value_state) { | |
^ ~ | |
!= nullptr | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include "torch/csrc/jit/interned_strings.h" | |
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
"torch/csrc/assertions.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:9:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <memory> | |
^ ~~~~~~~~ | |
<iostream> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:36:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
Type(TypeKind kind) | |
^~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:79:11: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] | |
virtual ~Type() {} | |
^ ~~ | |
= default; | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:90:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:93:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:104:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TensorType(const at::Tensor& tensor) | |
^~~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:140:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:149:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:152:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:163:8: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if(sizes.size() == 0) // zero-dim case | |
^~~~~~~~~~~~~~~~~~ | |
sizes.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<long>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:198:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:201:23: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:211:3: warning: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
TupleType(std::vector<TypePtr> elements_) | |
^~~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:218:16: warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] | |
virtual bool operator==(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:223:16: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual bool isSubtypeOf(const Type& rhs) const override { | |
~~~~~~~~~~~~~^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/jit/type.h:228:23: warning: 'virtual' is redundant since the function is already declared 'override' [hicpp-use-override] | |
virtual std::string name() const override { | |
~~~~~~~~~~~ ^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:5:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <string> | |
^ ~~~~~~~~ | |
<stdexcept> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:21:36: warning: C-style casts are discouraged; use static_cast [google-readability-casting] | |
setDevice(t.type().is_cuda() ? (int) t.get_device() : -1); | |
^~~~~~~ | |
static_cast<int>( ) | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:25:9: warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty] | |
if (tl.size() > 0) { | |
^~~~~~~~~~~~~~ | |
!tl.empty() | |
/home/psag/pytorch/pytorch/tools/cpp_build/../../aten/src/ATen/ArrayRef.h:110:10: note: method 'ArrayRef<at::Tensor>'::empty() defined here | |
bool empty() const { return Length == 0; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_gpu.h:31:3: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default] | |
~AutoGPU() { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/auto_unique_ptr.h:12:13: warning: redundant get() call on smart pointer [readability-redundant-smartptr-get] | |
return *this->get(); | |
^~~~~~~~~~~~ | |
*this | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/functional.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <vector> | |
^ ~~~~~~~~ | |
<ATen/ATen.h> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:40: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/hash.h:35:54: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise] | |
return seed ^ (value + 0x9e3779b9 + (seed << 6) + (seed >> 2)); | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:10:3: warning: move constructors should be marked noexcept [hicpp-noexcept-move] | |
THPPointer(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; }; | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:16:3: warning: 'operator type-parameter-0-0 *' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator T*() { return ptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:18:15: warning: move assignment operators should be marked noexcept [performance-noexcept-move-constructor] | |
THPPointer& operator =(THPPointer &&p) { free(); ptr = p.ptr; p.ptr = nullptr; return *this; } | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:20:3: warning: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor] | |
operator bool() const { return ptr != nullptr; } | |
^~~~~~~~ | |
explicit | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/object_ptr.h:27:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef THPPointer<PyObject> THPObjectPtr; | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
using THPObjectPtr = THPPointer<PyObject> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/python_stub.h:4:1: warning: use 'using' instead of 'typedef' [modernize-use-using] | |
typedef _object PyObject; | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
using PyObject = _object | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:3:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <ATen/ATen.h> | |
^ ~~~~~~~~~~~~~ | |
"torch/csrc/autograd/variable.h" | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:7:1: warning: #includes are not sorted properly [llvm-include-order] | |
#include <utility> | |
^ ~~~~~~~~~ | |
<tuple> | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/../torch/csrc/utils/variadic.h:31:7: warning: do not use 'else' after 'return' [readability-else-after-return] | |
} else { | |
^~~~~~ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:15:9: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
class Type : public torch::Optimizer_CRTP<Type> | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:3: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:18:21: warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] | |
CLS& NAME(TYP x = OPTION) { \ | |
^~~~~~~ | |
() | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/detail.h:23:1: warning: do not use unnamed namespaces in header files [google-build-namespaces] | |
namespace { | |
^ | |
/home/psag/pytorch/pytorch/tools/cpp_build/libtorch/../../../torch/csrc/api/include/torch/nn/modules/conv.h:32:38: warning: all parameters should be named in a function [readability-named-parameter] | |
variable_list forward(variable_list) override; | |
^ | |
/*input*/ | |
Suppressed 296852 warnings (296852 in non-user code). | |
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment