[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 4 01:00:12 PDT 2025
================
@@ -0,0 +1,40 @@
+//===--- UseEnumClassCheck.h - clang-tidy -----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_USEENUMCLASSCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_USEENUMCLASSCHECK_H
+
+#include "../ClangTidyCheck.h"
+
+namespace clang::tidy::cppcoreguidelines {
+
+/// Check for unscoped enums and suggest to use scoped enums (enum class).
----------------
vbvictor wrote:
Please sync this with sentences in docs and ReleaseNotes
https://github.com/llvm/llvm-project/pull/138282
More information about the cfe-commits
mailing list