[PATCH] D135405: fix handling of braced-init temporaries for modernize-use-emplace

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 15 14:01:35 PST 2022


njames93 accepted this revision.
njames93 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp:1268
+
+  v2.emplace_back(NonTrivialWithVector());
+  // CHECK-MESSAGES: :[[@LINE-1]]:19: warning: unnecessary temporary object created while calling emplace_back
----------------
Is this a test case that wasn't already caught, as braces aren't being used here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135405



More information about the cfe-commits mailing list