File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ namespace clang::tidy::cppcoreguidelines {
15
15
16
16
void UseEnumClassCheck::registerMatchers (MatchFinder *Finder) {
17
17
Finder->addMatcher (
18
- traverse (TK_AsIs,
19
- enumDecl (unless (isScoped ()), unless (hasParent (recordDecl ()))))
18
+ enumDecl (unless (isScoped ()), unless (hasParent (recordDecl ())))
20
19
.bind (" unscoped_enum" ),
21
20
this );
22
21
}
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ class UseEnumClassCheck : public ClangTidyCheck {
27
27
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override {
28
28
return LangOpts.CPlusPlus ;
29
29
}
30
+ std::optional<TraversalKind> getCheckTraversalKind () const override {
31
+ return TraversalKind::TK_IgnoreUnlessSpelledInSource;
32
+ }
30
33
};
31
34
32
35
} // namespace clang::tidy::cppcoreguidelines
You can’t perform that action at this time.
0 commit comments