File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,19 @@ namespace tidy {
2020namespace aliceO2 {
2121
2222void MemberNamesCheck::registerMatchers (MatchFinder *Finder) {
23- Finder->addMatcher (fieldDecl ().bind (" field_decl1" ), this );
23+ // Our policy says that only class members need to start with m, not
24+ // struct members
25+ Finder->addMatcher ((fieldDecl (hasParent (recordDecl (isClass ())))).bind (" field_decl1" ), this );
2426}
2527
2628void MemberNamesCheck::check (const MatchFinder::MatchResult &Result) {
2729 const auto *MatchedDecl = Result.Nodes .getNodeAs <FieldDecl>(" field_decl1" );
2830 if (MatchedDecl) {
2931 // check that we are inside the AliceO2 namespace to exlude system stuff
3032 // FIXME: needs to be configurable
31- if (MatchedDecl->getQualifiedNameAsString ().find (" AliceO2::" ) != 0 )
33+ // NOTE: AliceO2:: is the old one. We agreed to use o2::
34+ if ((MatchedDecl->getQualifiedNameAsString ().find (" AliceO2::" ) != 0 )
35+ && (MatchedDecl->getQualifiedNameAsString ().find (" o2::" ) != 0 ))
3236 return ;
3337
3438 if (std::regex_match (MatchedDecl->getNameAsString (), Regex)) {
You can’t perform that action at this time.
0 commit comments