Skip to content

Commit a6f2928

Browse files
committed
fixup! [clang-tidy] Added check to detect redundant inline keyword
Code format
1 parent fe1a9be commit a6f2928

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clang-tools-extra/clang-tidy/readability/RedundantInlineSpecifierCheck.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,17 @@ getInlineTokenLocation(SourceRange RangeLocation, const SourceManager &Sources,
5555

5656
void RedundantInlineSpecifierCheck::registerMatchers(MatchFinder *Finder) {
5757
Finder->addMatcher(
58-
functionDecl(isInlineSpecified(), anyOf(isConstexpr(), isDeleted(), isDefaulted(), isInAnonymousNamespace(),
58+
functionDecl(isInlineSpecified(),
59+
anyOf(isConstexpr(), isDeleted(), isDefaulted(),
60+
isInAnonymousNamespace(),
5961
allOf(isDefinition(), hasAncestor(recordDecl()))))
6062
.bind("fun_decl"),
6163
this);
6264

6365
Finder->addMatcher(
6466
varDecl(isInlineSpecified(),
65-
anyOf(isInAnonymousNamespace(), allOf(isConstexpr(), hasAncestor(recordDecl()))))
67+
anyOf(isInAnonymousNamespace(),
68+
allOf(isConstexpr(), hasAncestor(recordDecl()))))
6669
.bind("var_decl"),
6770
this);
6871

0 commit comments

Comments
 (0)