From d6ed1edd5d1173a1eba44f8011d5dab80b218bd6 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 13 Jun 2022 12:15:10 -0400 Subject: [PATCH] configure: enable -Wshadow-field-in-constructor Change-Id: I049672c0fe73fd7a0cc31e4aa9f750e64ee8ad70 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/8333 Tested-by: jenkins Reviewed-by: Philippe Proulx --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index f9f3fab7..ef7dbc39 100644 --- a/configure.ac +++ b/configure.ac @@ -700,6 +700,10 @@ m4_define([WARN_FLAGS_LIST], [ dnl -Wundef dnl -Wredundant-decls dnl -Wshadow dnl + dnl GCC's -Wshadow warns about constructor parameters shadowing fields, but + dnl Clang's does not. Enable Clang's `-Wshadow-field-in-constructor`, to make + dnl Clang warn about that. + -Wshadow-field-in-constructor dnl -Wjump-misses-init dnl -Wsuggest-attribute=format dnl -Wtautological-constant-out-of-range-compare dnl -- 2.34.1