================
@@ -0,0 +1,34 @@
+//===--- UseEnumClassCheck.cpp - clang-tidy 
-------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "UseEnumClassCheck.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::modernize {
+
+void UseEnumClassCheck::registerMatchers(MatchFinder *Finder) {
+  Finder->addMatcher(
+      traverse(TK_AsIs,
----------------
vbvictor wrote:

As I understand (maybe I'm wrong, correct me please) when 
`TK_IgnoreUnlessSpelledInSource` is specified, we would not traverse e.g. 
implicit instantiations of a templated class which has `enum class`, so the 
check will be faster with `TK_IgnoreUnlessSpelledInSource`. 
If I'm wrong and there are no performance benefits, we can still remove 
`traverse` call from `Finder->addMatcher` because it's default value, and we 
don't need to write it explicitly.


https://github.com/llvm/llvm-project/pull/138282
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to