This is a very basic warning implementation of Prefer special member functions and overloaded operators to C Standard Library functions
It absolutely needs some fine tuning though.
Differential D72488
[clang-tidy] Add check for CERT-OOP57-CPP njames93 on Jan 9 2020, 5:42 PM. Authored by
Details This is a very basic warning implementation of Prefer special member functions and overloaded operators to C Standard Library functions It absolutely needs some fine tuning though.
Diff Detail
Event Timeline
Comment Actions It may be reasonable to provide options to expand list of problematic functions. See bugprone-suspicious-string-compare as example. Comment Actions Added a way to specify custom mem set copy and compare functions plus nit fixes Can now use the options MemSetNames, MemCpyNames and MemCmpNames to specify custom functions to flag on
Comment Actions Please describe options in documentation. See other checks documentation as example.
Comment Actions
Comment Actions Unit tests: pass. 61850 tests passed, 0 failed and 781 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions Unit tests: fail. 61849 tests passed, 1 failed and 781 were skipped. failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_class/try_lock.pass.cpp clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions Unit tests: pass. 61850 tests passed, 0 failed and 781 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Comment Actions Unit tests: pass. 61850 tests passed, 0 failed and 781 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions LGTM with a few nits.
Comment Actions Unit tests: pass. 61941 tests passed, 0 failed and 783 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions Unit tests: pass. 61956 tests passed, 0 failed and 783 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml Comment Actions Btw, do you need me to commit this on your behalf, or have you obtained your commit privileges? Comment Actions Unit tests: pass. 62027 tests passed, 0 failed and 783 were skipped. clang-tidy: unknown. clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch. Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
|
You should do this formatting change, the per-merge check is actually correct for once. Don't bother with the ones in the test files though.