File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -8227,16 +8227,7 @@ VarDecl *VarDecl::getCanonicalVarDecl() const {
8227
8227
}
8228
8228
8229
8229
Stmt *VarDecl::getRecursiveParentPatternStmt () const {
8230
- // If our parent is already a pattern stmt, just return that.
8231
- if (auto *stmt = getParentPatternStmt ())
8232
- return stmt;
8233
-
8234
- // Otherwise, see if we have a parent var decl. If we do not, then return
8235
- // nullptr. Otherwise, return the case stmt that we found.
8236
- auto result = findParentPatternCaseStmtAndPattern (this );
8237
- if (!result.has_value ())
8238
- return nullptr ;
8239
- return result->first ;
8230
+ return getCanonicalVarDecl ()->getParentPatternStmt ();
8240
8231
}
8241
8232
8242
8233
// / Return the Pattern involved in initializing this VarDecl. Recall that the
You can’t perform that action at this time.
0 commit comments