[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
Tue Dec 18 12:52:17 PST 2018


ahatanak added a comment.

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`.


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