[PATCH] D148418: [clang-tidy] Fix typedefs handling in bugprone-dangling-handle

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 15 03:07:39 PDT 2023


carlosgalvezp added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp:55-56
 
-  operator basic_string_view() const noexcept;
+  typedef basic_string_view str_view;
+  operator str_view() const noexcept;
 
----------------
Right now the test will no longer test classes that have the conversion operator written explicitly instead of via typedef. Do you think it's worth keeping the other implementation as well, or can we safely assume that `basic_string` is always implemented like this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148418



More information about the cfe-commits mailing list