[clang-tools-extra] [clang-tidy] Add modernize-use-to-underlying check (PR #210459)
Adrian Vogelsgesang via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 24 13:02:14 PDT 2026
================
@@ -0,0 +1,55 @@
+// RUN: %check_clang_tidy -check-suffixes=IGNORE -std=c++23-or-later %s \
+// RUN: modernize-use-to-underlying %t -- \
+// RUN: -config="{CheckOptions: {modernize-use-to-underlying.ImpreciseCasts: Ignore}}"
+// RUN: %check_clang_tidy -check-suffixes=WARN -std=c++23-or-later %s \
+// RUN: modernize-use-to-underlying %t -- \
+// RUN: -config="{CheckOptions: {modernize-use-to-underlying.ImpreciseCasts: Warn}}"
+// RUN: %check_clang_tidy -check-suffixes=PRESERVE -std=c++23-or-later %s \
+// RUN: modernize-use-to-underlying %t -- \
+// RUN: -config="{CheckOptions: {modernize-use-to-underlying.ImpreciseCasts: PreserveType}}"
----------------
vogelsgesang wrote:
I simplified the checks, yet sightly differently than you proposed. Please let me know if you disagree with my approach
https://github.com/llvm/llvm-project/pull/210459
More information about the cfe-commits
mailing list