forked from OSchip/llvm-project
9bb5685b21
Summary: Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=27702 I wasn't sure how this type of thing is usually tested. So any advice would be appreciated. `check-llvm`, `check-clang` and `check-clang-tools` are clean for me. **C++98** ``` tetsuo@garland-c-16-sgp1-01:~/dev/llvm-project/test$ cat compile_commands.json [ { "directory": "/home/tetsuo/dev/llvm-project/test", "command": "/usr/bin/c++ -std=gnu++98 -o CMakeFiles/test.dir/test.cpp.o -c /home/tetsuo/dev/llvm-project/test/test.cpp", "file": "/home/tetsuo/dev/llvm-project/test/test.cpp" } ] tetsuo@garland-c-16-sgp1-01:~/dev/llvm-project/test$ ../build/bin/clang-tidy --checks=misc-unconventional-assign-operator test.cpp 3053 warnings generated. /home/tetsuo/dev/llvm-project/test/test.cpp:7:3: warning: operator=() should take 'Foo const&' or 'Foo' [misc-unconventional-assign-operator] Foo &operator=(Foo &Other) { ^ Suppressed 3052 warnings (3052 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. ``` **C++17** ``` tetsuo@garland-c-16-sgp1-01:~/dev/llvm-project/test$ cat compile_commands.json [ { "directory": "/home/tetsuo/dev/llvm-project/test", "command": "/usr/bin/c++ -std=gnu++17 -o CMakeFiles/test.dir/test.cpp.o -c /home/tetsuo/dev/llvm-project/test/test.cpp", "file": "/home/tetsuo/dev/llvm-project/test/test.cpp" } ] tetsuo@garland-c-16-sgp1-01:~/dev/llvm-project/test$ ../build/bin/clang-tidy --checks=misc-unconventional-assign-operator test.cpp 5377 warnings generated. /home/tetsuo/dev/llvm-project/test/test.cpp:7:3: warning: operator=() should take 'Foo const&', 'Foo&&' or 'Foo' [misc-unconventional-assign-operator] Foo &operator=(Foo &Other) { ^ Suppressed 5376 warnings (5376 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. ``` Reviewers: njames93, MaskRay, alexfh, hokein, aaron.ballman Reviewed By: njames93 Subscribers: xazax.hun, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D75901 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DefinitionsInHeadersCheck.cpp | ||
DefinitionsInHeadersCheck.h | ||
MiscTidyModule.cpp | ||
MisplacedConstCheck.cpp | ||
MisplacedConstCheck.h | ||
NewDeleteOverloadsCheck.cpp | ||
NewDeleteOverloadsCheck.h | ||
NoRecursionCheck.cpp | ||
NoRecursionCheck.h | ||
NonCopyableObjects.cpp | ||
NonCopyableObjects.h | ||
NonPrivateMemberVariablesInClassesCheck.cpp | ||
NonPrivateMemberVariablesInClassesCheck.h | ||
RedundantExpressionCheck.cpp | ||
RedundantExpressionCheck.h | ||
StaticAssertCheck.cpp | ||
StaticAssertCheck.h | ||
ThrowByValueCatchByReferenceCheck.cpp | ||
ThrowByValueCatchByReferenceCheck.h | ||
UnconventionalAssignOperatorCheck.cpp | ||
UnconventionalAssignOperatorCheck.h | ||
UniqueptrResetReleaseCheck.cpp | ||
UniqueptrResetReleaseCheck.h | ||
UnusedAliasDeclsCheck.cpp | ||
UnusedAliasDeclsCheck.h | ||
UnusedParametersCheck.cpp | ||
UnusedParametersCheck.h | ||
UnusedUsingDeclsCheck.cpp | ||
UnusedUsingDeclsCheck.h |