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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 13:23:54 PST 2018


rjmccall added a comment.

I think the right fix here is to call `CheckPlaceholderExpr` in `ActOnDecltypeExpression` / `HandleExprEvaluationContextForTypeof` before the original unevaluated context is exited.  You can then change the type-building routines to assert that they aren't given a placeholder.  The current ordering probably also causes unwanted behavior with expressions like `decltype(&functionTemplate<int>)` that should be getting resolved to a single template within the unevaluated context so that the template specialization is not considered ODR-used.


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