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 1c3d627 commit f47238fCopy full SHA for f47238f
clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
@@ -16,14 +16,14 @@ using namespace clang::ast_matchers;
16
namespace clang::tidy::bugprone {
17
18
void ReturnConstRefFromParameterCheck::registerMatchers(MatchFinder *Finder) {
19
- const auto DRef =
+ const auto DRef = ignoringParens(
20
declRefExpr(
21
to(parmVarDecl(hasType(hasCanonicalType(
22
qualType(lValueReferenceType(pointee(
23
qualType(isConstQualified()))))
24
.bind("type"))))
25
.bind("param")))
26
- .bind("dref");
+ .bind("dref"));
27
const auto Func =
28
functionDecl(hasReturnTypeLoc(loc(
29
qualType(hasCanonicalType(equalsBoundNode("type"))))))
0 commit comments