Sema: handle typo correction with ARC'ed objc properties
We would previously assert in findCapturingExpr when performing a typo
correction resulting in an assignment of an ObjC property with a strong lifetype
specifier due to the expression not being rooted in the file (invalid SLoc)
during the retain cycle check on the typo-corrected expression. Handle the
expression type appropriately during the TreeTransform to ensure that we have a
source location associated with the expression.
Fixes PR26486.
llvm-svn: 260016
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 32aa5a6..3083a1f 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -6586,6 +6586,10 @@
ExprResult TransformBlockExpr(BlockExpr *E) { return Owned(E); }
+ ExprResult TransformObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
+ return Owned(E);
+ }
+
ExprResult Transform(Expr *E) {
ExprResult Res;
while (true) {