Skip to content

Instantly share code, notes, and snippets.

@hvy
Created April 16, 2019 10:37
Show Gist options
  • Save hvy/a0b808cca4898ea14e1dafeeb129ee09 to your computer and use it in GitHub Desktop.
Save hvy/a0b808cca4898ea14e1dafeeb129ee09 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
Started by upstream project "chainer/chainer_pr" build number 333
originally caused by:
GitHub pull request #6441 of commit 87e4eb6f662973b13d7b565c55a6ad71982fb283, no merge conflicts.
Building remotely on gpcl-gpu205 (mn1-p100 sakura11) in workspace /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100
using credential 40bb97f1-7bf9-4f59-b66e-8d81d634b1a9
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository [email protected]:chainer/chainer-test.git
> git init /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100 # timeout=10
Fetching upstream changes from [email protected]:chainer/chainer-test.git
> git --version # timeout=10
using GIT_SSH to set credentials SSH Private Key for GitHub.com (chainer-ci)
> git fetch --tags --progress [email protected]:chainer/chainer-test.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url [email protected]:chainer/chainer-test.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url [email protected]:chainer/chainer-test.git # timeout=10
Fetching upstream changes from [email protected]:chainer/chainer-test.git
using GIT_SSH to set credentials SSH Private Key for GitHub.com (chainer-ci)
> git fetch --tags --progress [email protected]:chainer/chainer-test.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 6a4ba6f60052a944b60fc5c2b7ec004a089547bb (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 6a4ba6f60052a944b60fc5c2b7ec004a089547bb
Commit message: "Merge pull request #506 from kmaehashi/cuda-10.1"
> git rev-list --no-walk 6a4ba6f60052a944b60fc5c2b7ec004a089547bb # timeout=10
using credential 40bb97f1-7bf9-4f59-b66e-8d81d634b1a9
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository [email protected]:chainer/chainer.git
> git init /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer # timeout=10
Fetching upstream changes from [email protected]:chainer/chainer.git
> git --version # timeout=10
using GIT_SSH to set credentials SSH Private Key for GitHub.com (chainer-ci)
> git fetch --tags --progress [email protected]:chainer/chainer.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url [email protected]:chainer/chainer.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url [email protected]:chainer/chainer.git # timeout=10
Fetching upstream changes from [email protected]:chainer/chainer.git
using GIT_SSH to set credentials SSH Private Key for GitHub.com (chainer-ci)
> git fetch --tags --progress [email protected]:chainer/chainer.git +refs/pull/*:refs/remotes/origin/pr/*
JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData
Checking out Revision 70fc4d1c5d14a22259cf664dc0b5f06df60806f1 (refs/remotes/origin/pr/6441/merge)
> git config core.sparsecheckout # timeout=10
> git checkout -f 70fc4d1c5d14a22259cf664dc0b5f06df60806f1
Commit message: "Merge 87e4eb6f662973b13d7b565c55a6ad71982fb283 into fbf6c774985c4b4a2b669620988ac2bbec22a853"
First time build. Skipping changelog.
Set build name.
New build name is '#333: #6441 [DO NOT MERGE] Check headers with clang-tidy'
[mn1-p100] $ /bin/bash -ex /tmp/jenkins4418536632562638498.sh
+ export CHAINER_TEST_CACHE=/home/jenkins-external-slave/.chainer-test
+ CHAINER_TEST_CACHE=/home/jenkins-external-slave/.chainer-test
+ [[ CHAINERX_misc == CHAINERX_* ]]
+ '[' -d chainer/chainerx ']'
+ export CHAINERX_JENKINS_TEST_TYPE=misc
+ CHAINERX_JENKINS_TEST_TYPE=misc
+ bash chainer/scripts/ci/chainerx/jenkins/run_docker.sh /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer
+++ dirname chainer/scripts/ci/chainerx/jenkins/run_docker.sh
++ cd chainer/scripts/ci/chainerx/jenkins
++ pwd
+ this_dir=/home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer/scripts/ci/chainerx/jenkins
+ test 1 -eq 1
+ host_repo_dir=/home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer
+ test -d /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer
+ '[' -z misc ']'
+ container_name=chainerx-ci-333-11
+ container_workspace_dir=/workspace
+ container_repo_dir=/repo
+ container_work_dir=/workspace/work
+ container_conda_dir=/workspace/conda
++ mktemp -d
+ context_dir=/tmp/tmp.ukAvpBtQiC
+ cp /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer/scripts/ci/chainerx/setup-ubuntu.sh /tmp/tmp.ukAvpBtQiC/
+ cp /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer/scripts/ci/chainerx/setup-conda.sh /tmp/tmp.ukAvpBtQiC/
+ sed 's/{{{UID}}}/6009/g' /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer/scripts/ci/chainerx/jenkins/Dockerfile.template
+ docker build -t image1 --build-arg WORKSPACE_DIR=/workspace --build-arg WORK_DIR=/workspace/work --build-arg CONDA_DIR=/workspace/conda /tmp/tmp.ukAvpBtQiC
Sending build context to Docker daemon 4.608kB
Step 1/21 : FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu16.04
---> 78f3ecf29e62
Step 2/21 : LABEL chainerx_test_image=1
---> Using cache
---> ebf64c921e62
Step 3/21 : ARG TEMP_DIR=/tmp/tmp-xchainer-ci-dockerfile
---> Using cache
---> a887589dd5ca
Step 4/21 : ARG WORKSPACE_DIR
---> Using cache
---> 475bbfc7cc45
Step 5/21 : ARG WORK_DIR
---> Using cache
---> cca3ab10f9b3
Step 6/21 : ARG CONDA_DIR
---> Using cache
---> 5e29d670fbd8
Step 7/21 : RUN mkdir -p "$TEMP_DIR"
---> Using cache
---> f965a3ee8034
Step 8/21 : ADD setup-ubuntu.sh "$TEMP_DIR"/
---> Using cache
---> 7b9a85153960
Step 9/21 : ADD setup-conda.sh "$TEMP_DIR"/
---> Using cache
---> 44008069a794
Step 10/21 : RUN bash "$TEMP_DIR"/setup-ubuntu.sh
---> Using cache
---> 0e1977bb9930
Step 11/21 : ARG USER_TEMP_DIR="$TEMP_DIR"/user
---> Using cache
---> b2dbab03fc35
Step 12/21 : RUN mkdir -p "$USER_TEMP_DIR"
---> Using cache
---> d18a888ce83a
Step 13/21 : RUN mkdir -p "$WORKSPACE_DIR"
---> Using cache
---> 2bdbd287c92e
Step 14/21 : RUN useradd -m testuser -u 6009
---> Using cache
---> 28b5e17e9851
Step 15/21 : RUN chown testuser:testuser "$USER_TEMP_DIR"
---> Using cache
---> f919e7d88349
Step 16/21 : RUN chown testuser:testuser "$WORKSPACE_DIR"
---> Using cache
---> 7f85476b104e
Step 17/21 : USER testuser
---> Using cache
---> 8218333b4bfb
Step 18/21 : RUN mkdir -p "$WORK_DIR"
---> Using cache
---> 000aa309b42b
Step 19/21 : RUN mkdir -p "$CONDA_DIR"
---> Using cache
---> 47f8ff34800e
Step 20/21 : RUN bash "$TEMP_DIR"/setup-conda.sh "$USER_TEMP_DIR"/conda "$CONDA_DIR"
---> Using cache
---> fce79841ae81
Step 21/21 : RUN bash -c 'source '"$CONDA_DIR"'/bin/activate testenv && pip install -U cython && pip install git+https://github.com/cupy/cupy'
---> Using cache
---> 0b5492e6a001
Successfully built 0b5492e6a001
Successfully tagged image1:latest
+ test_command=(bash "$container_repo_dir"/scripts/ci/chainerx/jenkins/run.sh)
+ trap cleanup_container SIGINT SIGTERM
+ nvidia-docker run --name chainerx-ci-333-11 --user 6009 --volume /home/jenkins-external-slave/workspace/chainer/chainer_pr/TEST/CHAINERX_misc/label/mn1-p100/chainer:/repo --rm -e CHAINERX_JENKINS_BRANCH=chx-clang-tidy-headers -e CHAINERX_JENKINS_WORK_DIR=/workspace/work -e CHAINERX_JENKINS_REPO_DIR=/repo -e CHAINERX_JENKINS_CONDA_DIR=/workspace/conda -e CHAINERX_JENKINS_TEST_TYPE=misc image1 bash /repo/scripts/ci/chainerx/jenkins/run.sh
CHAINERX_JENKINS_BRANCH=chx-clang-tidy-headers
CHAINERX_JENKINS_CONDA_DIR=/workspace/conda
CHAINERX_JENKINS_REPO_DIR=/repo
CHAINERX_JENKINS_TEST_TYPE=misc
CHAINERX_JENKINS_WORK_DIR=/workspace/work
=== Step: show_environment_info
+ step_show_environment_info
+ source activate testenv
++ _CONDA_ROOT=/workspace/conda
++ . /workspace/conda/etc/profile.d/conda.sh
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
+++ '[' -z '' ']'
+++ export CONDA_SHLVL=0
+++ CONDA_SHLVL=0
+++ '[' x == condax ']'
+++++ dirname /workspace/conda/bin/conda
++++ dirname /workspace/conda/bin
+++ PATH=/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export PATH
+++ '[' -z '' ']'
+++ PS1=
++ conda activate testenv
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate testenv
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /workspace/conda/bin/conda shell.posix activate testenv
++ ask_conda='export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
++ eval 'export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
+++ export PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export CONDA_PREFIX=/workspace/conda/envs/testenv
+++ CONDA_PREFIX=/workspace/conda/envs/testenv
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export CONDA_DEFAULT_ENV=testenv
+++ CONDA_DEFAULT_ENV=testenv
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
++ whoami
+++ whoami
++ id -u testuser
+ echo 'whoami: testuser (6009)'
+ echo 'PWD: /'
+ g++ --version
whoami: testuser (6009)
PWD: /
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
+ which python
/workspace/conda/envs/testenv/bin/python
+ python --version
Python 3.6.8 :: Anaconda, Inc.
+ conda info -a
+ '[' 2 -lt 1 ']'
+ local cmd=info
+ shift
+ case "$cmd" in
+ /workspace/conda/bin/conda info -a
active environment : testenv
active env location : /workspace/conda/envs/testenv
shell level : 1
user config file : /home/testuser/.condarc
populated config files : /home/testuser/.condarc
conda version : 4.6.9
conda-build version : not installed
python version : 3.7.1.final.0
base environment : /workspace/conda (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /workspace/conda/pkgs
/home/testuser/.conda/pkgs
envs directories : /workspace/conda/envs
/home/testuser/.conda/envs
platform : linux-64
user-agent : conda/4.6.9 requests/2.21.0 CPython/3.7.1 Linux/4.4.0-143-generic ubuntu/16.04.5 glibc/2.23
UID:GID : 6009:6009
netrc file : None
offline mode : False
# conda environments:
#
base /workspace/conda
testenv * /workspace/conda/envs/testenv
sys.version: 3.7.1 (default, Dec 14 2018, 19:28:38)
...
sys.prefix: /workspace/conda
sys.executable: /workspace/conda/bin/python
conda location: /workspace/conda/lib/python3.7/site-packages/conda
conda-build: None
conda-env: /workspace/conda/bin/conda-env
user site dirs:
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: testenv
CONDA_DIR: /workspace/conda
CONDA_EXE: /workspace/conda/bin/conda
CONDA_PREFIX: /workspace/conda/envs/testenv
CONDA_PROMPT_MODIFIER:
CONDA_ROOT: /workspace/conda
CONDA_SHLVL: 1
LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64
LIBRARY_PATH: /usr/local/cuda/lib64/stubs
PATH: /workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
+ '[' -f /proc/driver/nvidia/version ']'
+ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 418.40.04 Fri Mar 15 00:59:12 CDT 2019
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
+ '[' -f /usr/local/cuda/version.txt ']'
+ cat /usr/local/cuda/version.txt
CUDA Version 9.2.148
+ set +x
=== Step: setup_conda_environment
+ step_setup_conda_environment
+ source activate testenv
++ _CONDA_ROOT=/workspace/conda
++ . /workspace/conda/etc/profile.d/conda.sh
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
+++ '[' -z '' ']'
+++ export CONDA_SHLVL=0
+++ CONDA_SHLVL=0
+++ '[' x == condax ']'
+++++ dirname /workspace/conda/bin/conda
++++ dirname /workspace/conda/bin
+++ PATH=/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export PATH
+++ '[' -z '' ']'
+++ PS1=
++ conda activate testenv
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate testenv
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /workspace/conda/bin/conda shell.posix activate testenv
++ ask_conda='export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
++ eval 'export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
+++ export PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export CONDA_PREFIX=/workspace/conda/envs/testenv
+++ CONDA_PREFIX=/workspace/conda/envs/testenv
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export CONDA_DEFAULT_ENV=testenv
+++ CONDA_DEFAULT_ENV=testenv
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ reqs=(autopep8 'pycodestyle<2.4.0,>=2.3' 'pbr>=1.8' 'pep8==1.5.7' 'pyflakes<1.7.0,>=1.6.0' 'flake8==3.5.0' 'mccabe==0.6.1' 'six>=1.9.0' pytest pytest-cov coveralls cpplint)
+ pip install -U autopep8 'pycodestyle<2.4.0,>=2.3' 'pbr>=1.8' pep8==1.5.7 'pyflakes<1.7.0,>=1.6.0' flake8==3.5.0 mccabe==0.6.1 'six>=1.9.0' pytest pytest-cov coveralls cpplint
Collecting autopep8
Downloading https://files.pythonhosted.org/packages/5b/ba/37d30e4263c51ee5a655118ac8c331e96a4e45fd4cea876a74b87af9ffc1/autopep8-1.4.3.tar.gz (113kB)
Collecting pycodestyle<2.4.0,>=2.3
Downloading https://files.pythonhosted.org/packages/e4/81/78fe51eb4038d1388b7217dd63770b0f428370207125047312886c923b26/pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
Collecting pbr>=1.8
Downloading https://files.pythonhosted.org/packages/14/09/12fe9a14237a6b7e0ba3a8d6fcf254bf4b10ec56a0185f73d651145e9222/pbr-5.1.3-py2.py3-none-any.whl (107kB)
Collecting pep8==1.5.7
Downloading https://files.pythonhosted.org/packages/e2/3a/fb53887b208e7e444c13b59244fcac4ef923678e6ae33e7fc71391f37b62/pep8-1.5.7-py2.py3-none-any.whl
Collecting pyflakes<1.7.0,>=1.6.0
Downloading https://files.pythonhosted.org/packages/d7/40/733bcc64da3161ae4122c11e88269f276358ca29335468005cb0ee538665/pyflakes-1.6.0-py2.py3-none-any.whl (227kB)
Collecting flake8==3.5.0
Downloading https://files.pythonhosted.org/packages/b9/dc/14e9d94c770b8c4ef584e906c7583e74864786a58d47de101f2767d50c0b/flake8-3.5.0-py2.py3-none-any.whl (69kB)
Collecting mccabe==0.6.1
Downloading https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Requirement already up-to-date: six>=1.9.0 in /workspace/conda/envs/testenv/lib/python3.6/site-packages (1.12.0)
Collecting pytest
Downloading https://files.pythonhosted.org/packages/7e/16/83b2a35c427b838df9836c9e7e4ae6dfbcbdea643db44652f693b1c57d70/pytest-4.4.0-py2.py3-none-any.whl (223kB)
Collecting pytest-cov
Downloading https://files.pythonhosted.org/packages/7d/b5/92f32674ab954f80499ac73347bfeb815545ea295439c12b0ef3ac8f0975/pytest_cov-2.6.1-py2.py3-none-any.whl
Collecting coveralls
Downloading https://files.pythonhosted.org/packages/10/b6/f60e90515658a61e18d5769ed9ca0a8b6a9a95a432d7d40328dd16754087/coveralls-1.7.0-py2.py3-none-any.whl
Collecting cpplint
Downloading https://files.pythonhosted.org/packages/30/9f/a44a503d457ebdb78298a1cb4dad99c1e506b901b300829fc28f3b3ddd6a/cpplint-1.4.4-py3-none-any.whl (73kB)
Collecting atomicwrites>=1.0 (from pytest)
Downloading https://files.pythonhosted.org/packages/52/90/6155aa926f43f2b2a22b01be7241be3bfd1ceaf7d0b3267213e8127d41f4/atomicwrites-1.3.0-py2.py3-none-any.whl
Collecting pluggy>=0.9 (from pytest)
Downloading https://files.pythonhosted.org/packages/84/e8/4ddac125b5a0e84ea6ffc93cfccf1e7ee1924e88f53c64e98227f0af2a5f/pluggy-0.9.0-py2.py3-none-any.whl
Collecting more-itertools>=4.0.0; python_version > "2.7" (from pytest)
Downloading https://files.pythonhosted.org/packages/b3/73/64fb5922b745fc1daee8a2880d907d2a70d9c7bb71eea86fcb9445daab5e/more_itertools-7.0.0-py3-none-any.whl (53kB)
Collecting attrs>=17.4.0 (from pytest)
Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Collecting py>=1.5.0 (from pytest)
Downloading https://files.pythonhosted.org/packages/76/bc/394ad449851729244a97857ee14d7cba61ddb268dce3db538ba2f2ba1f0f/py-1.8.0-py2.py3-none-any.whl (83kB)
Requirement already satisfied, skipping upgrade: setuptools in /workspace/conda/envs/testenv/lib/python3.6/site-packages (from pytest) (40.8.0)
Collecting coverage>=4.4 (from pytest-cov)
Downloading https://files.pythonhosted.org/packages/f8/4e/f28fc04019bac97d301512d904992791569234a06826cd420f78fba9a361/coverage-4.5.3-cp36-cp36m-manylinux1_x86_64.whl (205kB)
Collecting docopt>=0.6.1 (from coveralls)
Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Collecting requests>=1.0.0 (from coveralls)
Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /workspace/conda/envs/testenv/lib/python3.6/site-packages (from requests>=1.0.0->coveralls) (2019.3.9)
Collecting idna<2.9,>=2.5 (from requests>=1.0.0->coveralls)
Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
Collecting urllib3<1.25,>=1.21.1 (from requests>=1.0.0->coveralls)
Downloading https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl (118kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests>=1.0.0->coveralls)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Building wheels for collected packages: autopep8, docopt
Building wheel for autopep8 (setup.py): started
Building wheel for autopep8 (setup.py): finished with status 'done'
Stored in directory: /home/testuser/.cache/pip/wheels/91/07/fd/99884826d575c769102ddec2f9b96c7ad57cc6b5ca3a5e02b4
Building wheel for docopt (setup.py): started
Building wheel for docopt (setup.py): finished with status 'done'
Stored in directory: /home/testuser/.cache/pip/wheels/9b/04/dd/7daf4150b6d9b12949298737de9431a324d4b797ffd63f526e
Successfully built autopep8 docopt
autopep8 1.4.3 has requirement pycodestyle>=2.4.0, but you'll have pycodestyle 2.3.1 which is incompatible.
Installing collected packages: pycodestyle, autopep8, pbr, pep8, pyflakes, mccabe, flake8, atomicwrites, pluggy, more-itertools, attrs, py, pytest, coverage, pytest-cov, docopt, idna, urllib3, chardet, requests, coveralls, cpplint
Successfully installed atomicwrites-1.3.0 attrs-19.1.0 autopep8-1.4.3 chardet-3.0.4 coverage-4.5.3 coveralls-1.7.0 cpplint-1.4.4 docopt-0.6.2 flake8-3.5.0 idna-2.8 mccabe-0.6.1 more-itertools-7.0.0 pbr-5.1.3 pep8-1.5.7 pluggy-0.9.0 py-1.8.0 pycodestyle-2.3.1 pyflakes-1.6.0 pytest-4.4.0 pytest-cov-2.6.1 requests-2.21.0 urllib3-1.24.1
+ set +x
=== Step: python_style_check
+ step_python_style_check
+ source activate testenv
++ _CONDA_ROOT=/workspace/conda
++ . /workspace/conda/etc/profile.d/conda.sh
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
+++ '[' -z '' ']'
+++ export CONDA_SHLVL=0
+++ CONDA_SHLVL=0
+++ '[' x == condax ']'
+++++ dirname /workspace/conda/bin/conda
++++ dirname /workspace/conda/bin
+++ PATH=/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export PATH
+++ '[' -z '' ']'
+++ PS1=
++ conda activate testenv
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate testenv
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /workspace/conda/bin/conda shell.posix activate testenv
++ ask_conda='export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
++ eval 'export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
+++ export PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export CONDA_PREFIX=/workspace/conda/envs/testenv
+++ CONDA_PREFIX=/workspace/conda/envs/testenv
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export CONDA_DEFAULT_ENV=testenv
+++ CONDA_DEFAULT_ENV=testenv
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ check_targets=("$REPO_DIR"/*.py "$REPO_DIR"/chainer "$REPO_DIR"/chainermn "$REPO_DIR"/chainerx "$REPO_DIR"/tests "$REPO_DIR"/examples "$CHAINERX_DIR"/examples)
+ for f in '"${check_targets[@]}"'
+ test -e /repo/chainerx_build_helper.py
+ for f in '"${check_targets[@]}"'
+ test -e /repo/setup.py
+ for f in '"${check_targets[@]}"'
+ test -e /repo/chainer
+ for f in '"${check_targets[@]}"'
+ test -e /repo/chainermn
+ for f in '"${check_targets[@]}"'
+ test -e /repo/chainerx
+ for f in '"${check_targets[@]}"'
+ test -e /repo/tests
+ for f in '"${check_targets[@]}"'
+ test -e /repo/examples
+ for f in '"${check_targets[@]}"'
+ test -e /repo/chainerx_cc/examples
+ flake8 --version
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.8 on Linux
+ flake8 /repo/chainerx_build_helper.py /repo/setup.py /repo/chainer /repo/chainermn /repo/chainerx /repo/tests /repo/examples /repo/chainerx_cc/examples
+ autopep8 --version
autopep8 1.4.3 (pycodestyle: 2.3.1)
+ autopep8 /repo/chainerx_build_helper.py /repo/setup.py /repo/chainer /repo/chainermn /repo/chainerx /repo/tests /repo/examples /repo/chainerx_cc/examples -r --diff
+ tee /workspace/work/check_autopep8
+ test '!' -s /workspace/work/check_autopep8
+ set +x
=== Step: clang_format
+ step_clang_format
+ /repo/chainerx_cc/scripts/run-clang-format.sh --jobs 4
+ set +x
=== Step: cpplint
+ step_cpplint
+ source activate testenv
++ _CONDA_ROOT=/workspace/conda
++ . /workspace/conda/etc/profile.d/conda.sh
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
+++ '[' -z '' ']'
+++ export CONDA_SHLVL=0
+++ CONDA_SHLVL=0
+++ '[' x == condax ']'
+++++ dirname /workspace/conda/bin/conda
++++ dirname /workspace/conda/bin
+++ PATH=/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export PATH
+++ '[' -z '' ']'
+++ PS1=
++ conda activate testenv
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate testenv
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /workspace/conda/bin/conda shell.posix activate testenv
++ ask_conda='export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
++ eval 'export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
+++ export PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export CONDA_PREFIX=/workspace/conda/envs/testenv
+++ CONDA_PREFIX=/workspace/conda/envs/testenv
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export CONDA_DEFAULT_ENV=testenv
+++ CONDA_DEFAULT_ENV=testenv
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ /repo/chainerx_cc/scripts/run-cpplint.sh --jobs 4
Done processing /repo/chainerx_cc/chainerx/backend_util.h
Done processing /repo/chainerx_cc/chainerx/python/chainer_interop.h
Done processing /repo/chainerx_cc/chainerx/python/check_backward.h
Done processing /repo/chainerx_cc/chainerx/python/shape.h
Done processing /repo/chainerx_cc/chainerx/python/context.cc
Done processing /repo/chainerx_cc/chainerx/python/slice.cc
Done processing /repo/chainerx_cc/chainerx/python/graph.cc
Done processing /repo/chainerx_cc/chainerx/python/cuda/cuda_module.h
Done processing /repo/chainerx_cc/chainerx/python/cuda/cuda_module.cc
Done processing /repo/chainerx_cc/chainerx/python/scalar.cc
Done processing /repo/chainerx_cc/chainerx/python/strides.h
Done processing /repo/chainerx_cc/chainerx/python/routines.h
Done processing /repo/chainerx_cc/chainerx/python/dtype.cc
Done processing /repo/chainerx_cc/chainerx/python/axes.cc
Done processing /repo/chainerx_cc/chainerx/python/device.h
Done processing /repo/chainerx_cc/chainerx/python/shape.cc
Done processing /repo/chainerx_cc/chainerx/python/testing/device_buffer.h
Done processing /repo/chainerx_cc/chainerx/python/testing/testing_module.h
Done processing /repo/chainerx_cc/chainerx/python/testing/testing_module.cc
Done processing /repo/chainerx_cc/chainerx/python/testing/device_buffer.cc
Done processing /repo/chainerx_cc/chainerx/python/context.h
Done processing /repo/chainerx_cc/chainerx/python/stack_vector.h
Done processing /repo/chainerx_cc/chainerx/python/routines.cc
Done processing /repo/chainerx_cc/chainerx/python/check_backward.cc
Done processing /repo/chainerx_cc/chainerx/python/strides.cc
Done processing /repo/chainerx_cc/chainerx/python/graph.h
Done processing /repo/chainerx_cc/chainerx/python/error.cc
Done processing /repo/chainerx_cc/chainerx/python/error.h
Done processing /repo/chainerx_cc/chainerx/python/axes.h
Done processing /repo/chainerx_cc/chainerx/python/scalar.h
Done processing /repo/chainerx_cc/chainerx/python/dtype.h
Done processing /repo/chainerx_cc/chainerx/python/array_index.h
Done processing /repo/chainerx_cc/chainerx/python/array.cc
Done processing /repo/chainerx_cc/chainerx/python/backward.h
Done processing /repo/chainerx_cc/chainerx/python/core_module.cc
Done processing /repo/chainerx_cc/chainerx/python/backend.h
Done processing /repo/chainerx_cc/chainerx/python/backprop_mode.cc
Done processing /repo/chainerx_cc/chainerx/python/array_index.cc
Done processing /repo/chainerx_cc/chainerx/python/common.h
Done processing /repo/chainerx_cc/chainerx/python/slice.h
Done processing /repo/chainerx_cc/chainerx/python/backend.cc
Done processing /repo/chainerx_cc/chainerx/python/device.cc
Done processing /repo/chainerx_cc/chainerx/python/backprop_mode.h
Done processing /repo/chainerx_cc/chainerx/python/chainer_interop.cc
Done processing /repo/chainerx_cc/chainerx/python/array.h
Done processing /repo/chainerx_cc/chainerx/python/backward.cc
Done processing /repo/chainerx_cc/chainerx/backend_testdata/backend0.cc
Done processing /repo/chainerx_cc/chainerx/backend_testdata/backend1.cc
Done processing /repo/chainerx_cc/chainerx/arithmetic_ops.h
Done processing /repo/chainerx_cc/chainerx/check_backward.h
Done processing /repo/chainerx_cc/chainerx/shape_test.cc
Done processing /repo/chainerx_cc/chainerx/strides_test.cc
Done processing /repo/chainerx_cc/chainerx/enum.h
Done processing /repo/chainerx_cc/chainerx/numeric_limits.h
Done processing /repo/chainerx_cc/chainerx/axes_test.cc
Done processing /repo/chainerx_cc/chainerx/context.cc
Done processing /repo/chainerx_cc/chainerx/dims_test.cc
Done processing /repo/chainerx_cc/chainerx/array_fwd.h
Done processing /repo/chainerx_cc/chainerx/platform.cc
Done processing /repo/chainerx_cc/chainerx/dims.cc
Done processing /repo/chainerx_cc/chainerx/shape.h
Done processing /repo/chainerx_cc/chainerx/indexer_test.cc
Done processing /repo/chainerx_cc/chainerx/graph.cc
Done processing /repo/chainerx_cc/chainerx/op_registry_test.cc
Done processing /repo/chainerx_cc/chainerx/op.h
Done processing /repo/chainerx_cc/chainerx/platform.h
Done processing /repo/chainerx_cc/chainerx/context_test.cc
Done processing /repo/chainerx_cc/chainerx/dynamic_lib.cc
Done processing /repo/chainerx_cc/chainerx/dims.h
Done processing /repo/chainerx_cc/chainerx/backward_context.h
Done processing /repo/chainerx_cc/chainerx/cuda/cuda.h
Done processing /repo/chainerx_cc/chainerx/cuda/memory_pool.h
Done processing /repo/chainerx_cc/chainerx/array_device_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cudnn.h
Done processing /repo/chainerx_cc/chainerx/cuda/cast.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h
Done processing /repo/chainerx_cc/chainerx/cuda/memory_pool_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/dot.cu
Done processing /repo/chainerx_cc/chainerx/cuda/float16.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/indexing.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/arithmetic.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/conv.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/trigonometric.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/comparison.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/exp_log.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/reduction.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/misc.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/memory.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/pool.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/copy.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/fill.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/activation.cu
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device/batch_norm.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_runtime_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/numeric.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_conv_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_runtime.h
Done processing /repo/chainerx_cc/chainerx/cuda/elementwise.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cuda.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_backend.h
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_conv.h
Done processing /repo/chainerx_cc/chainerx/cuda/op_regist.h
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_backend.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cublas.h
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/numeric_limits.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/memory_pool.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_runtime.cc
Done processing /repo/chainerx_cc/chainerx/cuda/data_type.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cudnn.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_conv.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_backend_test.cc
Done processing /repo/chainerx_cc/chainerx/cuda/reduce.cuh
Done processing /repo/chainerx_cc/chainerx/cuda/cublas.cc
Done processing /repo/chainerx_cc/chainerx/cuda/cuda_device.h
Done processing /repo/chainerx_cc/chainerx/device_id.h
Done processing /repo/chainerx_cc/chainerx/squash_dims.h
Done processing /repo/chainerx_cc/chainerx/scalar.cc
Done processing /repo/chainerx_cc/chainerx/array_repr.cc
Done processing /repo/chainerx_cc/chainerx/strides.h
Done processing /repo/chainerx_cc/chainerx/dtype.cc
Done processing /repo/chainerx_cc/chainerx/optional_container_arg_test.cc
Done processing /repo/chainerx_cc/chainerx/axes.cc
Done processing /repo/chainerx_cc/chainerx/shape.cc
Done processing /repo/chainerx_cc/chainerx/float16.h
Done processing /repo/chainerx_cc/chainerx/device.h
Done processing /repo/chainerx_cc/chainerx/testing/routines.cc
Done processing /repo/chainerx_cc/chainerx/index_iterator.h
Done processing /repo/chainerx_cc/chainerx/testing/routines.h
Done processing /repo/chainerx_cc/chainerx/testing/util.h
Done processing /repo/chainerx_cc/chainerx/testing/array_check.h
Done processing /repo/chainerx_cc/chainerx/testing/array_check.cc
Done processing /repo/chainerx_cc/chainerx/testing/device_session.h
Done processing /repo/chainerx_cc/chainerx/testing/gtest_main.cc
Done processing /repo/chainerx_cc/chainerx/testing/context_session.h
Done processing /repo/chainerx_cc/chainerx/testing/routines_test.cc
Done processing /repo/chainerx_cc/chainerx/testing/array_test.cc
Done processing /repo/chainerx_cc/chainerx/testing/threading.h
Done processing /repo/chainerx_cc/chainerx/testing/util.cc
Done processing /repo/chainerx_cc/chainerx/numeric_limits_test.cc
Done processing /repo/chainerx_cc/chainerx/testing/array.h
Done processing /repo/chainerx_cc/chainerx/util.h
Done processing /repo/chainerx_cc/chainerx/device_test.cc
Done processing /repo/chainerx_cc/chainerx/array_body_leak_detection.h
Done processing /repo/chainerx_cc/chainerx/backward_fwd.h
Done processing /repo/chainerx_cc/chainerx/context.h
Done processing /repo/chainerx_cc/chainerx/stack_vector.h
Done processing /repo/chainerx_cc/chainerx/thread_local_state.h
Done processing /repo/chainerx_cc/chainerx/platform/windows.cc
Done processing /repo/chainerx_cc/chainerx/platform/windows.h
Done processing /repo/chainerx_cc/chainerx/array_body.h
Done processing /repo/chainerx_cc/chainerx/constant.h
Done processing /repo/chainerx_cc/chainerx/indexable_array.h
Done processing /repo/chainerx_cc/chainerx/check_backward.cc
Done processing /repo/chainerx_cc/chainerx/routines/logic.cc
Done processing /repo/chainerx_cc/chainerx/strides.cc
Done processing /repo/chainerx_cc/chainerx/backward_context.cc
Done processing /repo/chainerx_cc/chainerx/routines/type_util_test.cc
Done processing /repo/chainerx_cc/chainerx/routines/linalg.cc
Done processing /repo/chainerx_cc/chainerx/routines/type_util.h
Done processing /repo/chainerx_cc/chainerx/routines/creation.h
Done processing /repo/chainerx_cc/chainerx/routines/manipulation.h
Done processing /repo/chainerx_cc/chainerx/routines/type_util.cc
Done processing /repo/chainerx_cc/chainerx/routines/math.h
Done processing /repo/chainerx_cc/chainerx/routines/statistics.cc
Done processing /repo/chainerx_cc/chainerx/routines/manipulation.cc
Done processing /repo/chainerx_cc/chainerx/routines/pooling.h
Done processing /repo/chainerx_cc/chainerx/routines/sorting.cc
Done processing /repo/chainerx_cc/chainerx/routines/connection.cc
Done processing /repo/chainerx_cc/chainerx/routines/statistics_test.cc
Done processing /repo/chainerx_cc/chainerx/routines/normalization.h
Done processing /repo/chainerx_cc/chainerx/routines/routines_util.h
Done processing /repo/chainerx_cc/chainerx/routines/math.cc
Done processing /repo/chainerx_cc/chainerx/routines/pooling.cc
Done processing /repo/chainerx_cc/chainerx/routines/normalization.cc
Done processing /repo/chainerx_cc/chainerx/routines/creation_test.cc
Done processing /repo/chainerx_cc/chainerx/routines/connection.h
Done processing /repo/chainerx_cc/chainerx/routines/indexing.h
Done processing /repo/chainerx_cc/chainerx/routines/logic.h
Done processing /repo/chainerx_cc/chainerx/routines/indexing.cc
Done processing /repo/chainerx_cc/chainerx/routines/sorting.h
Done processing /repo/chainerx_cc/chainerx/routines/linalg.h
Done processing /repo/chainerx_cc/chainerx/routines/statistics.h
Done processing /repo/chainerx_cc/chainerx/thread_local_state.cc
Done processing /repo/chainerx_cc/chainerx/array_body_leak_detection_test.cc
Done processing /repo/chainerx_cc/chainerx/routines/creation.cc
Done processing /repo/chainerx_cc/chainerx/device_id.cc
Done processing /repo/chainerx_cc/chainerx/numerical_gradient_test.cc
Done processing /repo/chainerx_cc/chainerx/array.cc
Done processing /repo/chainerx_cc/chainerx/squash_dims_test.cc
Done processing /repo/chainerx_cc/chainerx/graph.h
Done processing /repo/chainerx_cc/chainerx/array_to_device_test.cc
Done processing /repo/chainerx_cc/chainerx/numeric.cc
Done processing /repo/chainerx_cc/chainerx/error.h
Done processing /repo/chainerx_cc/chainerx/axes.h
Done processing /repo/chainerx_cc/chainerx/op_node.h
Done processing /repo/chainerx_cc/chainerx/float16_test.cc
Done processing /repo/chainerx_cc/chainerx/numeric_test.cc
Done processing /repo/chainerx_cc/chainerx/scalar.h
Done processing /repo/chainerx_cc/chainerx/macro.h
Done processing /repo/chainerx_cc/chainerx/dtype_test.cc
Done processing /repo/chainerx_cc/chainerx/backprop_scope.h
Done processing /repo/chainerx_cc/chainerx/array_index.h
Done processing /repo/chainerx_cc/chainerx/numeric.h
Done processing /repo/chainerx_cc/chainerx/thread_local_state_test.cc
Done processing /repo/chainerx_cc/chainerx/backward.h
Done processing /repo/chainerx_cc/chainerx/indexable_array_test.cc
Done processing /repo/chainerx_cc/chainerx/dtype.h
Done processing /repo/chainerx_cc/chainerx/op_node.cc
Done processing /repo/chainerx_cc/chainerx/reduction_kernel_arg.h
Done processing /repo/chainerx_cc/chainerx/backend.h
Done processing /repo/chainerx_cc/chainerx/backprop_mode.cc
Done processing /repo/chainerx_cc/chainerx/native/col2im.h
Done processing /repo/chainerx_cc/chainerx/native/native_device/activation.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/misc.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/copy.cc
Done processing /repo/chainerx_cc/chainerx/stack_vector_test.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/reduction.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/conv.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/exp_log.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/arithmetic.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/fill.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/comparison.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/memory.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/indexing.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/trigonometric.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/batch_norm.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device/pool.cc
Done processing /repo/chainerx_cc/chainerx/native/tensor_dot.h
Done processing /repo/chainerx_cc/chainerx/native/elementwise.h
Done processing /repo/chainerx_cc/chainerx/native/native_device/dot.cc
Done processing /repo/chainerx_cc/chainerx/native/native_backend.h
Done processing /repo/chainerx_cc/chainerx/native/op_regist.h
Done processing /repo/chainerx_cc/chainerx/native/tensor_dot.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device_test.cc
Done processing /repo/chainerx_cc/chainerx/native/native_device.cc
Done processing /repo/chainerx_cc/chainerx/native/data_type.h
Done processing /repo/chainerx_cc/chainerx/native/native_backend.cc
Done processing /repo/chainerx_cc/chainerx/native/native_backend_test.cc
Done processing /repo/chainerx_cc/chainerx/native/im2col.cc
Done processing /repo/chainerx_cc/chainerx/native/im2col.h
Done processing /repo/chainerx_cc/chainerx/native/col2im.cc
Done processing /repo/chainerx_cc/chainerx/native/reduce.h
Done processing /repo/chainerx_cc/chainerx/native/native_device.h
Done processing /repo/chainerx_cc/chainerx/backward_builder.h
Done processing /repo/chainerx_cc/chainerx/scalar_test.cc
Done processing /repo/chainerx_cc/chainerx/optional_container_arg.h
Done processing /repo/chainerx_cc/chainerx/backend.cc
Done processing /repo/chainerx_cc/chainerx/check_backward_test.cc
Done processing /repo/chainerx_cc/chainerx/chainerx.h
Done processing /repo/chainerx_cc/chainerx/array_body_leak_detection.cc
Done processing /repo/chainerx_cc/chainerx/backward_builder_test.cc
Done processing /repo/chainerx_cc/chainerx/reduction_kernel_arg.cc
Done processing /repo/chainerx_cc/chainerx/array_repr.h
Done processing /repo/chainerx_cc/chainerx/slice.h
Done processing /repo/chainerx_cc/chainerx/hash_combine.h
Done processing /repo/chainerx_cc/chainerx/op_registry.h
Done processing /repo/chainerx_cc/chainerx/float16.cc
Done processing /repo/chainerx_cc/chainerx/array_repr_test.cc
Done processing /repo/chainerx_cc/chainerx/device.cc
Done processing /repo/chainerx_cc/chainerx/backprop_mode_test.cc
Done processing /repo/chainerx_cc/chainerx/dynamic_lib.h
Done processing /repo/chainerx_cc/chainerx/numerical_gradient.h
Done processing /repo/chainerx_cc/chainerx/index_iterator_test.cc
Done processing /repo/chainerx_cc/chainerx/array_test.cc
Done processing /repo/chainerx_cc/chainerx/numerical_gradient.cc
Done processing /repo/chainerx_cc/chainerx/array_node.h
Done processing /repo/chainerx_cc/chainerx/backward_builder.cc
Done processing /repo/chainerx_cc/chainerx/backprop_mode.h
Done processing /repo/chainerx_cc/chainerx/indexer.h
Done processing /repo/chainerx_cc/chainerx/array_body.cc
Done processing /repo/chainerx_cc/chainerx/array.h
Done processing /repo/chainerx_cc/chainerx/util.cc
Done processing /repo/chainerx_cc/chainerx/backward_test.cc
Done processing /repo/chainerx_cc/chainerx/backward.cc
+ set +x
=== Step: cmake
+ step_cmake
+ mkdir -p /workspace/work/build
+ pushd /workspace/work/build
/workspace/work/build /
+ cmake -DCMAKE_BUILD_TYPE=Debug -DCHAINERX_BUILD_CUDA=ON -DCHAINERX_BUILD_TEST=ON -DCHAINERX_BUILD_PYTHON=OFF -DCHAINERX_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=/workspace/work/install_target /repo/chainerx_cc
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring clang-tidy
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found cuDNN: v7.4.2 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Found CuDNN: /usr/include (found suitable version "7.4.2", minimum required is "7")
-- BLAS not found
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/work/build/gsl-lite-download
Scanning dependencies of target gsl-lite
[ 11%] Creating directories for 'gsl-lite'
[ 22%] Performing download step (git clone) for 'gsl-lite'
Cloning into 'gsl-lite'...
Note: checking out 'v0.32.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at be559be... Use dashes for the list
[ 33%] No patch step for 'gsl-lite'
[ 44%] Performing update step for 'gsl-lite'
[ 55%] No configure step for 'gsl-lite'
[ 66%] No build step for 'gsl-lite'
[ 77%] No install step for 'gsl-lite'
[ 88%] No test step for 'gsl-lite'
[100%] Completed 'gsl-lite'
[100%] Built target gsl-lite
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/work/build/optional-lite-download
Scanning dependencies of target optional-lite
[ 11%] Creating directories for 'optional-lite'
[ 22%] Performing download step (git clone) for 'optional-lite'
Cloning into 'optional-lite'...
Note: checking out 'v2.3.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at b2d3d63... Release 2.3.0, use std::optional if available
[ 33%] No patch step for 'optional-lite'
[ 44%] Performing update step for 'optional-lite'
[ 55%] No configure step for 'optional-lite'
[ 66%] No build step for 'optional-lite'
[ 77%] No install step for 'optional-lite'
[ 88%] No test step for 'optional-lite'
[100%] Completed 'optional-lite'
[100%] Built target optional-lite
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/work/build/gtest-download
Scanning dependencies of target googletest
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
Note: checking out 'release-1.8.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at ec44c6c... Merge pull request #821 from mazong1123/master
[ 33%] No patch step for 'googletest'
[ 44%] Performing update step for 'googletest'
[ 55%] No configure step for 'googletest'
[ 66%] No build step for 'googletest'
[ 77%] No install step for 'googletest'
[ 88%] No test step for 'googletest'
[100%] Completed 'googletest'
[100%] Built target googletest
-- Found PythonInterp: /workspace/conda/bin/python (found version "3.7.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/work/build
+ popd
/
+ set +x
=== Step: clang_tidy normal
+ step_clang_tidy normal
+ source activate testenv
++ _CONDA_ROOT=/workspace/conda
++ . /workspace/conda/etc/profile.d/conda.sh
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
+++ '[' -z '' ']'
+++ export CONDA_SHLVL=0
+++ CONDA_SHLVL=0
+++ '[' x == condax ']'
+++++ dirname /workspace/conda/bin/conda
++++ dirname /workspace/conda/bin
+++ PATH=/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export PATH
+++ '[' -z '' ']'
+++ PS1=
++ conda activate testenv
++ '[' 2 -lt 1 ']'
++ local cmd=activate
++ shift
++ case "$cmd" in
++ __conda_activate activate testenv
++ '[' -n '' ']'
++ local cmd=activate
++ shift
++ local ask_conda
+++ PS1=
+++ /workspace/conda/bin/conda shell.posix activate testenv
++ ask_conda='export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
++ eval 'export PATH='\''/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'\''
export CONDA_PREFIX='\''/workspace/conda/envs/testenv'\''
export CONDA_SHLVL='\''1'\''
export CONDA_DEFAULT_ENV='\''testenv'\''
export CONDA_PROMPT_MODIFIER='\'''\''
export CONDA_EXE='\''/workspace/conda/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\'''
+++ export PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ PATH=/workspace/conda/envs/testenv/bin:/workspace/conda/condabin:/workspace/conda/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ export CONDA_PREFIX=/workspace/conda/envs/testenv
+++ CONDA_PREFIX=/workspace/conda/envs/testenv
+++ export CONDA_SHLVL=1
+++ CONDA_SHLVL=1
+++ export CONDA_DEFAULT_ENV=testenv
+++ CONDA_DEFAULT_ENV=testenv
+++ export CONDA_PROMPT_MODIFIER=
+++ CONDA_PROMPT_MODIFIER=
+++ export CONDA_EXE=/workspace/conda/bin/conda
+++ CONDA_EXE=/workspace/conda/bin/conda
+++ export _CE_M=
+++ _CE_M=
+++ export _CE_CONDA=
+++ _CE_CONDA=
++ __conda_hashr
++ '[' -n '' ']'
++ '[' -n '' ']'
++ hash -r
+ local target=normal
+ pushd /workspace/work/build
/workspace/work/build /
+ /repo/chainerx_cc/scripts/run-clang-tidy.sh normal
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/context.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/slice.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/graph.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/cuda/cuda_module.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/scalar.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/routines.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/dtype.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/axes.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/shape.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/testing/device_buffer.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/testing/testing_module.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/check_backward.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/strides.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/array.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/error.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/core_module.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/backprop_mode.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/array_index.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/chainer_interop.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/backend.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/device.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/python/backward.cc. Compile command not found.
Skipping /workspace/work/build/../../../repo/chainerx_cc/chainerx/platform/windows.cc. Compile command not found.
2733 warnings generated.
Suppressed 2733 warnings (2733 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.
4505 warnings generated.
Suppressed 4506 warnings (4505 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4799 warnings generated.
Suppressed 4803 warnings (4799 in non-user code, 4 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6245 warnings generated.
Suppressed 6245 warnings (6243 in non-user code, 2 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings treated as errors
21643 warnings generated.
Suppressed 21633 warnings (21623 in non-user code, 10 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
16 warnings treated as errors
21159 warnings generated.
Suppressed 21115 warnings (21097 in non-user code, 18 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
35 warnings treated as errors
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/shape.h:104:39: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
std::ostream& operator<<(std::ostream&, const Shape&);
^ ~
/*os*/ /*shape*/
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{Dtype23329 warnings generated.
Suppressed 23265 warnings (23244 in non-user code, 21 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
54 warnings treated as errors
Kind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fi23332 warnings generated.
Suppressed 23268 warnings (23247 in non-user code, 21 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
54 warnings treated as errors
elds: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
e19547 warnings generated.
Suppressed 19541 warnings (19541 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.
4 warnings treated as errors
xplicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: 25690 warnings generated.
Suppressed 25603 warnings (25581 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
76 warnings treated as errors
error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/dims.h:12:7: error: class 'DimsFormatter' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DimsFormatter {
^
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [mode26864 warnings generated.
Suppressed 26773 warnings (26753 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
78 warnings treated as errors
rnize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/backward_context.h:36:39: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
explicit GradRef(nonstd::nullopt_t);
^
/*unused*/
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, 21126 warnings generated.
Suppressed 21137 warnings (21126 in non-user code, 11 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
24543 warnings generated.
Suppressed 24463 warnings (24441 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
71 warnings treated as errors
kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [26807 warnings generated.
Suppressed 26718 warnings (26696 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
78 warnings treated as errors
cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/dims.h:12:7: error: class 'DimsFormatter' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DimsFormatter {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider28374 warnings generated.
Suppressed 28285 warnings (28256 in non-user code, 26 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
84 warnings treated as errors
making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.28177 warnings generated.
Suppressed 28068 warnings (28039 in non-user code, 26 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
104 warnings treated as errors
h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v)26318 warnings generated.
Suppressed 26230 warnings (26208 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
77 warnings treated as errors
: float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional i24598 warnings generated.
Suppressed 24515 warnings (24493 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
72 warnings treated as errors
mplicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and us21703 warnings generated.
Suppressed 21693 warnings (21683 in non-user code, 10 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
16 warnings treated as errors
e std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/strides.h:97:39: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
std::ostream& operator<<(std::ostream&, const Strides&);
^ ~
/*os*/ /*strides*/
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnin24584 warnings generated.
Suppressed 24499 warnings (24479 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
72 warnings treated as errors
gs-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/rep23326 warnings generated.
Suppressed 23262 warnings (23242 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
53 warnings treated as errors
o/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-ini21330 warnings generated.
Suppressed 21338 warnings (21326 in non-user code, 12 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings treated as errors
t,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move4503 warnings generated.
Suppressed 4501 warnings (4501 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.
2 warnings treated as errors
27994 warnings generated.
Suppressed 27905 warnings (27876 in non-user code, 26 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
84 warnings treated as errors
assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/device_id.h:33:39: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
std::ostream& operator<<(std::ostream&, const DeviceId&);
^ ~
/*os*/ /*device_id*/
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T22013 warnings generated.
Suppressed 22011 warnings (22001 in non-user code, 10 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings treated as errors
>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Ax27476 warnings generated.
Suppressed 27388 warnings (27365 in non-user code, 23 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
78 warnings treated as errors
es : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/axes.h:75:39: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
std::ostream& operator<<(std::ostream&, const Axes&);
^ ~
/*os*/ /*axes*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/routines/type_util.h:87:9: error: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty,-warnings-as-errors]
if (args.size() == 0U) {
^~~~~~~~~~~~~~~~~~
args.empty()
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_vector.h:743:7: note: method 'vector<chainerx::Array, std::allocator<chainerx::Array> >'::empty() defined here
empty() const _GLIBCXX_NOEXCEPT
^
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by v28154 warnings generated.
Suppressed 28064 warnings (28035 in non-user code, 26 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
85 warnings treated as errors
alue and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:165:64: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
friend CudaDevice* cuda_internal::CreateDevice(CudaBackend&, int);
^ ~
/*backend*/ /*index*/
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument c25751 warnings generated.
Suppressed 25665 warnings (25642 in non-user code, 23 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
76 warnings treated as errors
26580 warnings generated.
Suppressed 26492 warnings (26470 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
77 warnings treated as errors
onstructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:20:7: error: class 'ThreadLocalState' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ThreadLocalState {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:23:31: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
explicit ThreadLocalState(const internal::InternalThreadLocalState& state) : state_{state} {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
internal::InternalThreadLocalState std::move()
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fie24762 warnings generated.
Suppressed 24675 warnings (24655 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
74 warnings treated as errors
lds: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy33026 warnings generated.
Suppressed 32956 warnings (32914 in non-user code, 42 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
79 warnings treated as errors
assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:20:7: error: class 'ThreadLocalState' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ThreadLocalState {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:23:31: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
explicit ThreadLocalState(const internal::InternalThreadLocalState& state) : state_{state} {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
internal::InternalThreadLocalState std::move()
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start24827 warnings generated.
Suppressed 24742 warnings (24722 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
74 warnings treated as errors
, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/testing/threading.h:151:11: error: macro argument should be enclosed in parentheses [misc-macro-parentheses,-warnings-as-errors]
class test_case_name : public parent_class, public testing::ThreadSafeTestBase { \
^~~~~~~~~~~~~~
()
/repo/chainerx_cc/chainerx/testing/threading.h:151:35: error: macro argument should be enclosed in parentheses [misc-macro-parentheses,-warnings-as-errors]
class test_case_name : public parent_class, public testing::ThreadSafeTestBase { \
^~~~~~~~~~~~~
()
/repo/chainerx_cc/chainerx/testing/threading.h:171:79: error: macro argument should be enclosed in parentheses [misc-macro-parentheses,-warnings-as-errors]
class CHAINERX_TEST_DUMMY_CLASS_NAME_(test_case_name, test_name) : public parent_class { \
^~~~~~~~~~~~
()
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; u26483 warnings generated.
Suppressed 26395 warnings (26373 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
77 warnings treated as errors
se (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:20:7: error: class 'ThreadLocalState' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ThreadLocalState {
^
/repo/chainerx_cc/chainerx/thread_local_state.h:23:31: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
explicit ThreadLocalState(const internal::InternalThreadLocalState& state) : state_{state} {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
internal::InternalThreadLocalState std::move()
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
26653 warnings generated.
Suppressed 26562 warnings (26542 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
78 warnings treated as errors
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/dims.h:12:7: error: class 'DimsFormatter' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DimsFormatter {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:3925396 warnings generated.
Suppressed 25294 warnings (25274 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
91 warnings treated as errors
: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-exp26585 warnings generated.
Suppressed 26497 warnings (26475 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
77 warnings treated as errors
licit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
356 warnings generated.
Suppressed 356 warnings (352 in non-user code, 4 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings treated as errors
28801 warnings generated.
Suppressed 28710 warnings (28681 in non-user code, 26 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
86 warnings treated as errors
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:18:26: error: constructor does not initialize these fields: status_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
using ChainerxError::ChainerxError;
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/routines/normalization.h:20:7: error: class 'BatchNormGradState' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BatchNormGradState {
^
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bo23052 warnings generated.
Suppressed 23058 warnings (23047 in non-user code, 10 NOLINT, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings treated as errors
24738 warnings generated.
Suppressed 24656 warnings (24636 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
71 warnings treated as errors
ol>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_28178 warnings generated.
Suppressed 28092 warnings (28060 in non-user code, 29 NOLINT, 3 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
84 warnings treated as errors
{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/cuda/cublas.h:16:7: error: class 'CublasHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CublasHandle {
^
/repo/chainerx_cc/chainerx/cuda/cuda_backend.h:54:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:38:7: error: class 'MemoryKeeper' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryKeeper {
^
/repo/chainerx_cc/chainerx/cuda/cuda_device.h:57:7: error: class 'DeviceInternals' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class DeviceInternals {
^
/repo/chainerx_cc/chainerx/cuda/cuda_set_device_scope.h:14:5: error: constructor does not initialize these fields: orig_index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit CudaSetDeviceScope(int index) : index_{index} {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:50:7: error: class 'CudnnTensorDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnTensorDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:65:7: error: class 'CudnnFilterDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnFilterDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:78:7: error: class 'CudnnConvolutionDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnConvolutionDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:96:7: error: class 'CudnnPoolingDescriptor' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnPoolingDescriptor {
^
/repo/chainerx_cc/chainerx/cuda/cudnn.h:116:7: error: class 'CudnnHandle' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class CudnnHandle {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:73:7: error: class 'Chunk' defines a non-default destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Chunk {
^
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:79:5: error: use '= default' to define a trivial destructor [modernize-use-equals-default,-warnings-as-errors]
~Chunk() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/cuda/memory_pool.h:114:7: error: class 'MemoryPool' defines a non-default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MemoryPool {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chaine24668 warnings generated.
Suppressed 24566 warnings (24546 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
91 warnings treated as errors
rx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/ch24850 warnings generated.
Suppressed 24747 warnings (24727 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
92 warnings treated as errors
ainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/native/native_device.h:95:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
friend NativeDevice* native_internal::CreateDevice(NativeBackend&, int);
^ ~
/*backend*/ /*index*/
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{Arra24743 warnings generated.
Suppressed 24641 warnings (24621 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
91 warnings treated as errors
yIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
25232 warnings generated.
Suppressed 25134 warnings (25092 in non-user code, 42 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
92 warnings treated as errors
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:70:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, s3196 warnings generated.
Suppressed 3196 warnings (3196 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.
25603 warnings generated.
Suppressed 25506 warnings (25473 in non-user code, 33 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
90 warnings treated as errors
tep_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-27170 warnings generated.
Suppressed 27079 warnings (27057 in non-user code, 22 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
77 warnings treated as errors
warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/backprop_mode.h:54:14: error: initializer-list constructor should not be declared explicit [google-explicit-constructor,-warnings-as-errors]
explicit BackpropModeScope(std::initializer_list<BackpropId> backprop_ids)
~~~~~~~~~^~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/backward_builder.h:55:7: error: class 'RetainedArrayToken' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class RetainedArrayToken {
^
/repo/chainerx_cc/chainerx/backward_builder.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:62:25: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
RetainedArrayToken& operator=(RetainedArrayToken&&) = default;
^
/repo/chainerx_cc/chainerx/backward_builder.h:92:7: error: class 'BackwardBuilder' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackwardBuilder {
^
/repo/chainerx_cc/chainerx/backward_context.h:29:7: error: class 'GradRef' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class GradRef {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_25446 warnings generated.
Suppressed 25337 warnings (25306 in non-user code, 31 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
93 warnings treated as errors
t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayBody {
^
/repo/chainerx_cc/chainerx/array_index.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(int64_t index) : tag_{ArrayIndexTag::kSingleElement}, index_{index} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:21:16: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^ ~~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:21:67: error: parameter 'slice' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
ArrayIndex(Slice slice) : tag_{ArrayIndexTag::kSlice}, slice_{slice} {} // NOLINT(runtime/explicit)
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/array_index.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/array_index.h:22:23: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
ArrayIndex(NewAxis) : tag_{ArrayIndexTag::kNewAxis} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/array_node.h:20:7: error: class 'ArrayNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class ArrayNode {
^
/repo/chainerx_cc/chainerx/array_node.h:22:15: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
ArrayNode(const Shape& shape, Dtype dtype, Device& device, BackpropId backprop_id)
^~~~~~~~~~~~
Shape
/repo/chainerx_cc/chainerx/array_node.h:23:71: error: std::move of the variable 'backprop_id' of the trivially-copyable type 'chainerx::BackpropId' has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
: shape_{shape}, dtype_{dtype}, device_{device}, backprop_id_{std::move(backprop_id)} {}
^~~~~~~~~~~~~~~~~~~~~~~
/repo/chainerx_cc/chainerx/axes.h:20:7: error: class 'Axes' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Axes : public StackVector<int8_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/context.h:215:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
ContextScope(ContextScope&& other) : orig_ctx_{other.orig_ctx_}, orig_device_{other.orig_device_}, exited_{other.exited_} {
^
/repo/chainerx_cc/chainerx/device.h:23:7: error: class 'MaxPoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class MaxPoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:31:7: error: class 'AveragePoolForwardBackward' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class AveragePoolForwardBackward {
^
/repo/chainerx_cc/chainerx/device.h:197:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
DeviceScope(DeviceScope&& other) : orig_(other.orig_), exited_(other.exited_) { other.exited_ = true; }
^
/repo/chainerx_cc/chainerx/device_id.h:14:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
DeviceId(const std::string& device_name); // NOLINT(runtime/explicit)
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/float16.h:14:26: error: constructor does not initialize these fields: data_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^
/repo/chainerx_cc/chainerx/float16.h:14:26: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
CHAINERX_HOST_DEVICE Float16() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/float16.h:29:66: error: implicit conversion 'float' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
CHAINERX_HOST_DEVICE explicit operator bool() const { return static_cast<float>(*this); }
^ ~
!= 0.0f
/repo/chainerx_cc/chainerx/float16.h:62:70: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
CHAINERX_HOST_DEVICE constexpr Float16(uint16_t data, FromDataTag) : data_{data} {}
^
/*unused*/
/repo/chainerx_cc/chainerx/graph.h:18:7: error: class 'BackpropId' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class BackpropId {
^
/repo/chainerx_cc/chainerx/index_iterator.h:50:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:67:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/index_iterator.h:120:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < 1; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:175:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:229:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i + offset_dim] = index_source.index()[i];
^
/repo/chainerx_cc/chainerx/index_iterator.h:233:26: error: 'operator bool' must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
CHAINERX_HOST_DEVICE operator bool() const { return raw_index_ < total_size_; }
^~~~~~~~
explicit
/repo/chainerx_cc/chainerx/index_iterator.h:250:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[j] = i % shape_[j];
^
/repo/chainerx_cc/chainerx/indexable_array.h:49:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(VoidType* data, const Strides& strides) : data_{data} { std::copy(strides.begin(), strides.end(), strides_); }
^
/repo/chainerx_cc/chainerx/indexable_array.h:51:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:59:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:70:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:181:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
auto data_ptr = reinterpret_cast<WithConstnessOfT<uint8_t>*>(data_) +
^
/repo/chainerx_cc/chainerx/indexable_array.h:219:5: error: constructor does not initialize these fields: strides_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(WithConstnessOfT<void>* data, const Strides& strides) : data_{data}, ndim_{strides.ndim()} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:223:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
IndexableArray(const Array& array, const Strides& strides) : IndexableArray{internal::GetRawOffsetData(array), strides} {
^
/repo/chainerx_cc/chainerx/indexable_array.h:231:5: error: constructor does not initialize these fields: strides_, ndim_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit IndexableArray(const Array& array) : IndexableArray{array, array.strides()} {}
^
/repo/chainerx_cc/chainerx/indexable_array.h:242:25: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
data_ptr += strides_[dim] * index[dim];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexable_array.h:265:27: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
strides_[i] = c[axes[i]];
^
/repo/chainerx_cc/chainerx/indexer.h:16:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
NdimIndex(const int64_t* index, int8_t ndim) : ndim_{ndim} { std::copy_n(index, ndim, index_); }
^
/repo/chainerx_cc/chainerx/indexer.h:18:5: error: constructor does not initialize these fields: index_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
explicit NdimIndex(int8_t ndim) : ndim_{ndim} {
^
/repo/chainerx_cc/chainerx/indexer.h:20:13: error: do not use array subscript when the index is not an integer constant expression; use gsl::at() instead [cppcoreguidelines-pro-bounds-constant-array-index,-warnings-as-errors]
index_[i] = 0;
^
/repo/chainerx_cc/chainerx/native/native_backend.h:39:9: error: initializing non-owner 'chainerx::OpRegistry *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory,-warnings-as-errors]
static OpRegistry* global_op_registry = new OpRegistry{};
^
/repo/chainerx_cc/chainerx/op.h:5:7: error: class 'Op' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Op {
^
/repo/chainerx_cc/chainerx/op_node.h:73:7: error: class 'OpNode' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class OpNode {
^
/repo/chainerx_cc/chainerx/op_registry.h:17:5: error: use '= default' to define a trivial default constructor [modernize-use-equals-default,-warnings-as-errors]
OpRegistry() {}
^ ~~
= default;
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:18:43: error: all parameters should be named in a function [readability-named-parameter,-warnings-as-errors]
OptionalContainerArg(nonstd::nullopt_t) : opt_{nonstd::nullopt} {} // NOLINT(runtime/explicit)
^
/*unused*/
/repo/chainerx_cc/chainerx/optional_container_arg.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const T& value) : opt_{Container{{value}}} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(const Container& v) : opt_{v} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/optional_container_arg.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
OptionalContainerArg(Container&& v) : opt_{std::move(v)} {} // NOLINT(runtime/explicit)
^~~~~~~~~~~~~~~~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:15:7: error: class 'Scalar' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Scalar {
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: constructor does not initialize these fields: int_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:17:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(bool v) : bool_{v}, kind_{DtypeKind::kBool} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:18:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:19:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:20:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:21:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(int64_t v) : int_{v}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:22:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint8_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:23:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint16_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: constructor does not initialize these fields: bool_, float_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:24:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(uint32_t v) : int_{int64_t{v}}, kind_{DtypeKind::kInt} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/expli24912 warnings generated.
Suppressed 24830 warnings (24810 in non-user code, 20 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
71 warnings treated as errors
cit)
^
/repo/chainerx_cc/chainerx/scalar.h:25:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(Float16 v) : float_{static_cast<double>(v)}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:26:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(float v) : float_{double{v}}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: constructor does not initialize these fields: bool_, int_ [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^
/repo/chainerx_cc/chainerx/scalar.h:27:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]
Scalar(double v) : float_{v}, kind_{DtypeKind::kFloat} {} // NOLINT(runtime/explicit)
^~~~~~
explicit
/repo/chainerx_cc/chainerx/scalar.h:33:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
bool_ = static_cast<bool>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:38:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
int_ = static_cast<int64_t>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:42:17: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
float_ = static_cast<double>(v);
^
/repo/chainerx_cc/chainerx/scalar.h:75:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -int_;
^
/repo/chainerx_cc/chainerx/scalar.h:77:25: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return -float_;
^
/repo/chainerx_cc/chainerx/scalar.h:113:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(bool_);
^
/repo/chainerx_cc/chainerx/scalar.h:115:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(int_);
^
/repo/chainerx_cc/chainerx/scalar.h:117:39: error: do not access members of unions; use (boost::)variant instead [cppcoreguidelines-pro-type-union-access,-warnings-as-errors]
return static_cast<T>(float_);
^
/repo/chainerx_cc/chainerx/shape.h:22:7: error: class 'Shape' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Shape : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/slice.h:14:11: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:44: error: pass by value and use std::move [modernize-pass-by-value,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
^
/repo/chainerx_cc/chainerx/slice.h:14:102: error: the parameter 'step' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors]
Slice(nonstd::optional<int64_t> start, nonstd::optional<int64_t> stop, nonstd::optional<int64_t> step)
~~~~~~ ^
const &
/repo/chainerx_cc/chainerx/slice.h:15:18: error: parameter 'start' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~~
std::move()
/repo/chainerx_cc/chainerx/slice.h:15:32: error: parameter 'stop' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param,-warnings-as-errors]
: start_{start}, stop_{stop}, step_{step.value_or(1)} {
^~~~~
std::move()
/repo/chainerx_cc/chainerx/stack_vector.h:23:7: error: class 'StackVector' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class StackVector {
^
/repo/chainerx_cc/chainerx/stack_vector.h:60:5: error: move constructors should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector(StackVector&& other) : n_{other.n_} { std::move(other.d_.begin(), other.d_.begin() + other.n_, d_.begin()); }
^
/repo/chainerx_cc/chainerx/stack_vector.h:62:18: error: move assignment operators should be marked noexcept [performance-noexcept-move-constructor,-warnings-as-errors]
StackVector& operator=(StackVector&& other) {
^
/repo/chainerx_cc/chainerx/strides.h:23:7: error: class 'Strides' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Strides : public StackVector<int64_t, kMaxNdim> {
^
/repo/chainerx_cc/chainerx/array.h:47:7: error: class 'Array' defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions,-warnings-as-errors]
class Array {
^
/repo/chainerx_cc/chainerx/array_body.h:26:7: error: class 'ArrayBody' defines a copy constructo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment