Rakete1111 marked an inline comment as done.
Rakete1111 added inline comments.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:4859
     // recurse to handle whatever we get.
-    if (TryAnnotateTypeOrScopeToken())
+    if (TryAnnotateTypeOrScopeToken(!getCurScope()->isTemplateParamScope()))
       return true;
----------------
rsmith wrote:
> This seems surprising to me; I'd expect to have an implicit `typename` here 
> approximately when not `DisambiguatingWithExpression`. Also basing this off 
> the scope seems wrong, as we can switch into and out of implicit `typename` 
> contexts multiple times within a scope. Eg, in `template<typename T, 
> T::template U<T::V>>` we get an implicit `typename` for `T::template U` but 
> not for `T::V` despite them being in the same scope.
> 
> Should the callers of this function be passing in an "implicit `typename`" 
> flag?
Seems like `template <typename T, T::template U<T::V>>` isn't accepted as a 
context with an implicit typename (for the `T::template`). I'll look into it :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D53847



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to