[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 30 11:10:44 PDT 2025


================
@@ -1289,7 +1305,11 @@ void testBracedInitTemporaries() {
   v2.push_back(NonTrivialWithVector{{0}});
   v2.push_back({{0}});
   v2.push_back(NonTrivialWithVector{std::vector<int>{0}});
+  // CHECK-MESSAGES-CPP20: :[[@LINE-1]]:6: warning: use emplace_back instead of push_back
----------------
vbvictor wrote:

Looks great

https://github.com/llvm/llvm-project/pull/131969


More information about the cfe-commits mailing list