[libcxx-commits] [libcxx] 26ac9cb - [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all used checks
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 21 11:25:22 PDT 2022
Author: Nikolas Klauser
Date: 2022-06-21T20:25:04+02:00
New Revision: 26ac9cbf000c55e40529400392dc5156e263517f
URL: https://github.com/llvm/llvm-project/commit/26ac9cbf000c55e40529400392dc5156e263517f
DIFF: https://github.com/llvm/llvm-project/commit/26ac9cbf000c55e40529400392dc5156e263517f.diff
LOG: [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all used checks
Reviewed By: #libc, ldionne
Spies: aheejin, libcxx-commits, xazax.hun
Differential Revision: https://reviews.llvm.org/D127896
Added:
Modified:
libcxx/.clang-tidy
libcxx/include/strstream
Removed:
################################################################################
diff --git a/libcxx/.clang-tidy b/libcxx/.clang-tidy
index 20a0bb8012b3..9a2c8b328a31 100644
--- a/libcxx/.clang-tidy
+++ b/libcxx/.clang-tidy
@@ -1,14 +1,17 @@
-InheritParentConfig: true
Checks: >
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-infinite-loop,
+ bugprone-stringview-nullptr,
+ bugprone-use-after-move,
- -llvm-else-after-return,
- -llvm-header-guard,
- -llvm-qualified-auto,
+ llvm-include-order,
+ llvm-namespace-comment,
- -misc-unconventional-assign-operator,
+ misc-definitions-in-headers,
+ misc-misplaced-const,
+ misc-non-copyable-objects,
+ misc-uniqueptr-reset-release,
modernize-loop-convert,
modernize-redundant-void-arg,
@@ -16,7 +19,6 @@ Checks: >
readability-duplicate-include,
readability-function-cognitive-complexity,
readability-function-size,
- -readability-identifier-naming,
readability-misplaced-array-index,
readability-redundant-control-flow,
readability-redundant-function-ptr-dereference,
@@ -34,6 +36,7 @@ CheckOptions:
# bugprone-branch-clone,
# bugprone-macro-parentheses,
# cppcoreguidelines-prefer-member-initializer,
+# misc-unused-parameters,
# modernize-use-bool-literals,
# modernize-use-default-member-init,
# modernize-use-equals-default,
diff --git a/libcxx/include/strstream b/libcxx/include/strstream
index 9ffdd9f84a31..72386bb9567f 100644
--- a/libcxx/include/strstream
+++ b/libcxx/include/strstream
@@ -266,8 +266,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
istrstream& operator=(istrstream&& __rhs)
{
- istream::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
+ istream::operator=(_VSTD::move(__rhs));
return *this;
}
#endif // _LIBCPP_CXX03_LANG
@@ -315,8 +315,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
ostrstream& operator=(ostrstream&& __rhs)
{
- ostream::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
+ ostream::operator=(_VSTD::move(__rhs));
return *this;
}
#endif // _LIBCPP_CXX03_LANG
@@ -375,8 +375,8 @@ public:
_LIBCPP_INLINE_VISIBILITY
strstream& operator=(strstream&& __rhs)
{
- iostream::operator=(_VSTD::move(__rhs));
__sb_ = _VSTD::move(__rhs.__sb_);
+ iostream::operator=(_VSTD::move(__rhs));
return *this;
}
#endif // _LIBCPP_CXX03_LANG
More information about the libcxx-commits
mailing list