Commit Graph

13 Commits

Author SHA1 Message Date
Aaron Gokaslan b5357d1fa8
fix(clang-tidy): Enable clang-tidy else-after-return and redundant void checks (#3080)
* Enable clang-tidy else-after-return and redundant void checks

* Fix remaining else-after

* Address reviewer comments

* Fix indentation

* Rerun clang-tidy post merge
2021-07-09 06:45:53 -07:00
Aaron Gokaslan dac74ebdf5
fix(clang-tidy): performance fixes applied in tests and CI (#3051)
* Initial fixes

* Whoops

* Finish clang-tidy manual fixes

* Add two missing fixes

* Revert

* Update clang-tidy

* Try to fix unreachable code error

* Move nolint comment

* Apply missing fix

* Don't override clang-tidy config

* Does this fix clang-tidy?

* Make all clang-tidy errors visible

* Add comments about NOLINTs and remove a few

* Fix typo
2021-06-22 12:11:54 -04:00
Aaron Gokaslan 3b30b0a51e
fix(clang-tidy): clang-tidy readability and misc fixes, like adding const (#3052)
* Enable and apply clang-tidy readability and misc fixes.

* Revert deprecated tester

* add space to tests/test_constants_and_functions.cpp
2021-06-21 10:37:48 -04:00
Aaron Gokaslan e0b5cbd4c6
chore(clang-tidy): add more modernize clang-tidy checks (#3049)
* Add more modernize clang-tidy checks

* Enable a few more
2021-06-19 18:38:56 -04:00
Aaron Gokaslan af6218ff78
fix(clang-tidy): Apply performance fixes from clang-tidy (#3046)
* Apply performance fixes from clang-tidy

* 2nd Round of Perf Optimizations

* 3rd round of fixes & handle false-positive

* Apply missing fix and clang-format

* Apply reviewer comment
2021-06-19 10:53:27 -07:00
Henry Schreiner e7bafc8ec1 style: clang-tidy: default checks and fix bug in iostream deconstruction
```
/pybind11/include/pybind11/iostream.h:71:9: warning: Call to virtual method 'pythonbuf::sync' during destruction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall]
        sync();
        ^
/pybind11/tests/test_iostream.cpp:72:5: note: Calling '~scoped_ostream_redirect'
    });
```
2020-09-15 09:56:59 -04:00
Henry Schreiner 4d78640830 style: clang-tidy: modernize-use-emplace 2020-09-15 09:56:59 -04:00
Henry Schreiner ce88e940ce style: clang-tidy: modernize-use-auto 2020-09-15 09:56:59 -04:00
Henry Schreiner b491b465c7 style: clang-tidy: modernize-use-equals-default 2020-09-15 09:56:59 -04:00
Henry Schreiner b342c37388 style: clang-tidy: modernize-use-using 2020-09-15 09:56:59 -04:00
Henry Schreiner 96e6a8d554 style: clang-tidy: readability-container-size-empty 2020-09-15 09:56:59 -04:00
Henry Schreiner 5dfbe6f903 style: clang-tidy: modernize-use-override 2020-09-15 09:56:59 -04:00
Henry Schreiner 8dc31c7b29 style: clang-tidy: llvm-namespace-comment 2020-09-15 09:56:59 -04:00