Don't revisit the subexpressions of PseudoObjectExpr when building a
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 2 Dec 2022 19:41:09 +0000 (11:41 -0800)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 2 Dec 2022 19:41:09 +0000 (11:41 -0800)
commit1127e479e85011b4284dd5097ca2732347198130
tree58bacf5fd61212feab9ddd22155968ef70076064
parent4e12d1836ae03f1f30226b8c4f2edeef6bf4a650
Don't revisit the subexpressions of PseudoObjectExpr when building a
ParentMap

The assertion that is removed in this patch was failing when ObjC dot
notation expressions appear in both sides of an assignment (see the test
case in arc-repeated-weak.mm). Visit the PseudoObjectExpr once when the
syntactic expression is visited and return without visiting the
subexpressions when it's visited again when the semantic expressions are
visited.

Differential Revision: https://reviews.llvm.org/D139171
clang/lib/AST/ParentMap.cpp
clang/test/SemaObjC/arc-repeated-weak.mm