Skip to content

Commit 5eea328

Browse files
committed
run clang-tidy with C++17
1 parent cc21af7 commit 5eea328

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ Checks: >
4343
-modernize-deprecated-ios-base-aliases,
4444
-misc-include-cleaner,
4545
-misc-unused-using-decls,
46+
-modernize-avoid-bind,
4647
-modernize-loop-convert,
4748
-modernize-macro-to-enum,
49+
-modernize-make-unique,
4850
-modernize-raw-string-literal,
4951
-modernize-replace-auto-ptr,
5052
-modernize-return-braced-init-list,

clang-tidy.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Does not improve the readability.
133133
`misc-unconventional-assign-operator`<br/>
134134
`bugprone-throwing-static-initialization`<br/>
135135
`bugprone-command-processor`<br/>
136+
`modernize-use-nodiscard`<br/>
136137

137138
To be evaluated (need to remove exclusion).
138139

@@ -150,7 +151,6 @@ To be evaluated (need to remove exclusion).
150151
To be evaluated (need to enable explicitly).
151152

152153
`modernize-type-traits`<br/>
153-
`modernize-use-nodiscard`<br/>
154154
`modernize-use-scoped-lock`<br/>
155155

156156
These apply to codebases which use later standards then C++11 (C++17 is used when building with Qt6) so we cannot simply apply them.
@@ -163,6 +163,11 @@ We are not interested in this.
163163

164164
Reports false positives - see https://github.com/llvm/llvm-project/issues/164125.
165165

166+
`modernize-avoid-bind`<br/>
167+
`modernize-make-unique`<br/>
168+
169+
Requires us to move to a higher C++ standard by default.
170+
166171
### Disabled for performance reasons
167172

168173
`portability-std-allocator-const`<br/>

cmake/cxx11.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ macro(use_cxx11)
99
endif()
1010
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to use")
1111
else()
12-
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use")
12+
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use")
1313
endif()
1414
endmacro()

0 commit comments

Comments
 (0)