[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 3 21:49:55 PST 2019


ahatanak added a comment.

In D55662#1346055 <https://reviews.llvm.org/D55662#1346055>, @rjmccall wrote:

> I think you could just disable the diagnostic in an unevaluated context.


The call to `isUnevaluatedContext` in `ObjCPropertyOpBuilder::complete` returns false when the type of `auto __weak wp` in `testAuto` is being deduced because the `ExpressionEvaluationContextRecord` on the stack isn't an unevaluated context. I can silence the warning if I can push an unevaluated context at the entry of `Sema::DeduceAutoType`, but it's not clear to me that it's safe to do so.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55662/new/

https://reviews.llvm.org/D55662





More information about the cfe-commits mailing list