We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8787bc7 commit 17a7f20Copy full SHA for 17a7f20
clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
@@ -41,11 +41,12 @@ void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) {
41
qualType(hasCanonicalType(equalsBoundNode("type"))))))
42
.bind("func");
43
44
- Finder->addMatcher(returnStmt(hasReturnValue(DRef), hasAncestor(Func)), this);
45
Finder->addMatcher(
46
- returnStmt(hasReturnValue(ignoringParens(conditionalOperator(
47
- eachOf(hasTrueExpression(DRef), hasFalseExpression(DRef)),
48
- hasAncestor(Func))))),
+ returnStmt(
+ hasReturnValue(anyOf(
+ DRef, ignoringParens(conditionalOperator(eachOf(
+ hasTrueExpression(DRef), hasFalseExpression(DRef)))))),
49
+ hasAncestor(Func)),
50
this);
51
}
52
0 commit comments