[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
Tue Dec 18 13:48:02 PST 2018
rjmccall added a comment.
In D55662#1335146 <https://reviews.llvm.org/D55662#1335146>, @ahatanak wrote:
> Here are a couple of examples I found running the regression tests:
>
> int f0(int);
> float f0(float);
> decltype(f0) f0_a; // this is not valid.
>
>
>
>
> template <class... Ts>
> int var_expr(Ts... ts);
>
> template <class... Ts>
> auto a_function(Ts... ts) -> decltype(var_expr(ts...));
>
> template <class T>
> using partial = decltype(a_function<int, T>);
>
> int use_partial() { partial<char> n; }
>
>
>
>
> template<class T> void oneT() { }
> int main()
> {
> decltype(oneT<int>)* fun = 0;
> }
>
>
> If the call to `CheckPlaceholderExpr` in `Sema::BuildDecltypeType` is moved to `TreeTransform<Derived>::TransformDecltypeType` and `Parser::ParseDecltypeSpecifier`, we can assert at the beginning of `Sema::BuildDecltypeType`.
Okay, I'm not really understanding what path goes through those two places but not through `ActOnDecltypeExpression`, since both of them seem to unconditionally call the latter (at least, in the expression-parsing path).
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