[libcxx-commits] [PATCH] D127896: [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all used checks

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 21 11:25:25 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG26ac9cbf000c: [libc++][clang-tidy] Enable bugprone-use-after-move and explicitly list all… (authored by philnik).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127896/new/

https://reviews.llvm.org/D127896

Files:
  libcxx/.clang-tidy
  libcxx/include/strstream


Index: libcxx/include/strstream
===================================================================
--- libcxx/include/strstream
+++ libcxx/include/strstream
@@ -266,8 +266,8 @@
     _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 @@
     _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 @@
     _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
Index: libcxx/.clang-tidy
===================================================================
--- libcxx/.clang-tidy
+++ 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 @@
   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 @@
 # 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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127896.438777.patch
Type: text/x-patch
Size: 2320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220621/e775faf3/attachment-0001.bin>


More information about the libcxx-commits mailing list