Skip to content

Commit 6cbabc4

Browse files
authored
maint(clang-tidy): Enable cpp-coreguideline slicing checks (#3210)
* maint(clang-tidy): add a clang-tidy slicing check * Add self + touch up readme * Fix typo
1 parent fdac5fb commit 6cbabc4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FormatStyle: file
33
Checks: '
44
*bugprone*,
55
cppcoreguidelines-init-variables,
6+
cppcoreguidelines-slicing,
67
clang-analyzer-optin.cplusplus.VirtualCall,
78
llvm-namespace-comment,
89
misc-misplaced-const,

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ About
134134
This project was created by `Wenzel
135135
Jakob <http://rgl.epfl.ch/people/wjakob>`_. Significant features and/or
136136
improvements to the code were contributed by Jonas Adler, Lori A. Burns,
137-
Sylvain Corlay, Eric Cousineau, Ralf Grosse-Kunstleve, Trent Houliston, Axel
137+
Sylvain Corlay, Eric Cousineau, Aaron Gokaslan, Ralf Grosse-Kunstleve, Trent Houliston, Axel
138138
Huebl, @hulucc, Yannick Jadoul, Sergey Lyskov Johan Mabille, Tomasz Miąsko,
139-
Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim
139+
Dean Moldovan, Ben Pritchard, Jason Rhinelander, Boris Schäling, Pim
140140
Schellart, Henry Schreiner, Ivan Smirnov, Boris Staletic, and Patrick Stewart.
141141

142142
We thank Google for a generous financial contribution to the continuous

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ inline str enum_name(handle arg) {
16641664
}
16651665

16661666
struct enum_base {
1667-
enum_base(handle base, handle parent) : m_base(base), m_parent(parent) { }
1667+
enum_base(const handle &base, const handle &parent) : m_base(base), m_parent(parent) { }
16681668

16691669
PYBIND11_NOINLINE void init(bool is_arithmetic, bool is_convertible) {
16701670
m_base.attr("__entries") = dict();

0 commit comments

Comments
 (0)