[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 3 07:44:39 PDT 2018


mboehme added a comment.

In https://reviews.llvm.org/D49910#1187455, @aaron.ballman wrote:

> Are you going to propose adding this attribute to libc++, or is this expected to only work with UDTs?


I don't have any experience contributing to libc++, but I think this would make sense.

The check currently hard-codes various member functions of classes in the "std" namespace that do reinitializations; I'm not sure though if those can be removed after the attribute has been added to libc++. We'd would also presumably have to add the attribute to libstdc++ -- does it accept Clang-only attributes? And what is the story for people using clang-tidy with MSVC projects? (I have to admit I'm very hazy on how that works...)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49910





More information about the cfe-commits mailing list