[PATCH] D86410: [flang][msvc] Avoid ambiguous overload from base class. NFC.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 10:01:48 PDT 2020


Meinersbur added a comment.

In D86410#2233901 <https://reviews.llvm.org/D86410#2233901>, @klausler wrote:

> Is the MSVC bug peculiar to template member functions like `template <int K> operator()(const TypeParamInquiry<K> &) const`?  If so, is it peculiar to *just* `TypeParamInquiry`, or does it affect other templatized expression nodes as well?

The error happens with hidden methods with non-type templated method in templated base classes. The smallest reproducer I could create is this: https://godbolt.org/z/59ar5d. It does not occur when the template parameter is a class type: https://godbolt.org/z/1xo8jh. Thus, I think TypeParamInquiry is the only one affected.

> If that turns out to be the case, there's some changes to the expression representation that could be tried that would avoid the use of a template in that case.

Could you elaborate?

> Another possible work-around, if the problem is specific to this one expression representation class: specialize the member function in the general `Traverse` class for each of the integer kinds.

Which specializations for KIND do we need? 8,16,32,64, any other?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86410



More information about the llvm-commits mailing list