forked from OSchip/llvm-project
[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:
parent
4561475e09
commit
b73b5cda62
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue