ahatanak added a comment. We can make `DeduceVariableDeclarationType` return the rewritten expression and replace `Init` in `Sema::AddInitializerToDecl` with it.
Alternatively, we can keep a set of `ObjCPropertyRefExpr`s passed to `recordUseOfWeak` (the original `ObjCPropertyRefExpr`, if it was rebuilt in SemaPseudoObject.cpp) and avoid recording the use of a weak variable if the expression is passed the second time. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55662/new/ https://reviews.llvm.org/D55662 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits