[clang] [clang] Mark -Wlarge-by-value-copy diagnostics DefaultIgnore (PR #214696)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 03:22:42 PDT 2026
https://github.com/richardmilles created https://github.com/llvm/llvm-project/pull/214696
These warnings only fire when a size threshold is provided, so they should not be documented as enabled by default.
Fixes #37523
>From 1beb0349b8060104bcac5b6e3af4fbf6ca5bc1ab Mon Sep 17 00:00:00 2001
From: richardmilles <darkenhalneke at gmail.com>
Date: Fri, 7 Aug 2026 10:17:06 +0200
Subject: [PATCH] [clang] Mark -Wlarge-by-value-copy diagnostics DefaultIgnore
Fixes #37523
---
clang/include/clang/Basic/DiagnosticSemaKinds.td | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index b57ff6c197d1d..738537ba40c91 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -548,10 +548,10 @@ def warn_import_implementation_partition_unit_in_interface_unit : Warning<
def warn_parameter_size: Warning<
"%0 is a large (%1 bytes) pass-by-value argument; "
- "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
+ "pass it by reference instead ?">, InGroup<LargeByValueCopy>, DefaultIgnore;
def warn_return_value_size: Warning<
"return value of %0 is a large (%1 bytes) pass-by-value object; "
- "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
+ "pass it by reference instead ?">, InGroup<LargeByValueCopy>, DefaultIgnore;
def warn_return_value_udt: Warning<
"%0 has C-linkage specified, but returns user-defined type %1 which is "
"incompatible with C">, InGroup<ReturnTypeCLinkage>;
More information about the cfe-commits
mailing list