Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
e0b5cbd4
Unverified
Commit
e0b5cbd4
authored
Jun 19, 2021
by
Aaron Gokaslan
Committed by
GitHub
Jun 19, 2021
Browse files
chore(clang-tidy): add more modernize clang-tidy checks (#3049)
* Add more modernize clang-tidy checks * Enable a few more
parent
af6218ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
.clang-tidy
.clang-tidy
+11
-4
tests/test_factory_constructors.cpp
tests/test_factory_constructors.cpp
+2
-2
No files found.
.clang-tidy
View file @
e0b5cbd4
...
...
@@ -2,12 +2,17 @@ FormatStyle: file
Checks: '
llvm-namespace-comment,
modernize-
use-override
,
readability-container-size-em
pt
y
,
modernize-
use-using
,
modernize-
use-equals-defaul
t,
modernize-
avoid-bind
,
modernize-replace-auto-
pt
r
,
modernize-
replace-disallow-copy-and-assign-macro
,
modernize-
shrink-to-fi
t,
modernize-use-auto,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-emplace,
modernize-use-override,
modernize-use-using,
readability-container-size-empty,
'
CheckOptions:
...
...
@@ -15,3 +20,5 @@ CheckOptions:
value: 'exception_ptr$;'
HeaderFilterRegex: 'pybind11/.*h'
WarningsAsErrors: '*'
tests/test_factory_constructors.cpp
View file @
e0b5cbd4
...
...
@@ -20,12 +20,12 @@ class TestFactory1 {
TestFactory1
()
:
value
(
"(empty)"
)
{
print_default_created
(
this
);
}
TestFactory1
(
int
v
)
:
value
(
std
::
to_string
(
v
))
{
print_created
(
this
,
value
);
}
TestFactory1
(
std
::
string
v
)
:
value
(
std
::
move
(
v
))
{
print_created
(
this
,
value
);
}
public:
std
::
string
value
;
TestFactory1
(
TestFactory1
&&
)
=
delete
;
TestFactory1
(
const
TestFactory1
&
)
=
delete
;
TestFactory1
&
operator
=
(
TestFactory1
&&
)
=
delete
;
TestFactory1
&
operator
=
(
const
TestFactory1
&
)
=
delete
;
public:
std
::
string
value
;
~
TestFactory1
()
{
print_destroyed
(
this
);
}
};
// Non-public construction, but moveable:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment