[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 Jul 13 23:49:07 PDT 2025


================
@@ -1434,3 +1436,33 @@ void testWithPointerTypes() {
   // CHECK-MESSAGES: :[[@LINE-1]]:15: warning: unnecessary temporary object created while calling emplace
   // CHECK-FIXES: sp->emplace();
 }
+
+namespace GH1225740 {
+
+void CXX20testBracedInitTemporaries(){
+
----------------
vbvictor wrote:

Could we add tests with multiple values in `initListExpr()`. AFAIK we only have tests with 0 or 1 values.

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


More information about the cfe-commits mailing list