Skip to content

Commit bf56de2

Browse files
author
git apple-llvm automerger
committed
Merge commit '6c1fd539e43e' from llvm.org/release/19.x into stable/20240723
2 parents 36194d4 + 6c1fd53 commit bf56de2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ class StructAccessBase
10531053
}
10541054
const Expr *VisitCastExpr(const CastExpr *E) {
10551055
if (E->getCastKind() == CK_LValueToRValue)
1056-
return E;
1056+
return IsExpectedRecordDecl(E) ? E : nullptr;
10571057
return Visit(E->getSubExpr());
10581058
}
10591059
const Expr *VisitParenExpr(const ParenExpr *E) {

0 commit comments

Comments
 (0)