[clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCasts

ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped
by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the
IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which
is not needed since ExprWithCleanups is always created as a direct child of
ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp).

NFC intended.

llvm-svn: 354228
This commit is contained in:
Bruno Ricci 2019-02-17 18:21:54 +00:00
parent 4561475e09
commit b73b5cda62
1 changed files with 2 additions and 3 deletions

View File

@ -163,9 +163,8 @@ void DanglingHandleCheck::registerMatchersForReturn(MatchFinder *Finder) {
// Return a temporary.
Finder->addMatcher(
returnStmt(
has(ignoringParenImpCasts(exprWithCleanups(has(ignoringParenImpCasts(
handleFrom(IsAHandle, handleFromTemporaryValue(IsAHandle))))))))
returnStmt(has(exprWithCleanups(has(ignoringParenImpCasts(handleFrom(
IsAHandle, handleFromTemporaryValue(IsAHandle)))))))
.bind("bad_stmt"),
this);
}