[PATCH] D132640: [clang-tidy] Fix modernize-use-emplace to support alias cases

Dong-hee Na via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 26 00:22:04 PDT 2022


corona10 marked an inline comment as done.
corona10 added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp:1059
 
   priority_queue.emplace(Foo(13));
   // CHECK-MESSAGES: :[[@LINE-1]]:26: warning: unnecessary temporary object created while calling emplace
----------------
njames93 wrote:
> Can you please add a test like this, where emplace is called with a temporary object when the container type is an alias.
Done!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132640



More information about the cfe-commits mailing list