[libcxx-commits] [PATCH] D124714: [libc++] Enable modernize-use-override

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 30 09:49:56 PDT 2022


Mordante added a comment.

Nice improvement! Looking at the UBSAN CI failures there are more `overrides` to be added.
Can you add an NFC to the title of the patch?



================
Comment at: libcxx/include/__memory/shared_ptr.h:134
+    ~bad_weak_ptr() _NOEXCEPT override;
+     const char* what() const  _NOEXCEPT override;
 };
----------------
Just curious did you use `-fix` for clang-tidy?


================
Comment at: libcxx/include/codecvt:216
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change?


================
Comment at: libcxx/include/codecvt:248
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change?


================
Comment at: libcxx/include/codecvt:283
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change?


================
Comment at: libcxx/include/codecvt:317
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change?


================
Comment at: libcxx/include/codecvt:351
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change?


================
Comment at: libcxx/include/codecvt:385
 protected:
-    virtual result
-        do_out(state_type& __st,
-               const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
-               extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual result
-        do_in(state_type& __st,
-              const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
-              intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const;
-    virtual result
-        do_unshift(state_type& __st,
-                   extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const;
-    virtual int do_encoding() const _NOEXCEPT;
-    virtual bool do_always_noconv() const _NOEXCEPT;
-    virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end,
-                          size_t __mx) const;
-    virtual int do_max_length() const _NOEXCEPT;
+     result do_out(state_type& __st,
+                   const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
----------------
Did the indention change? Please also validate similar changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124714



More information about the libcxx-commits mailing list