[all-commits] [llvm/llvm-project] 2bc589: [flang][msvc] Add explicit function template argum...

Michael Kruse via All-commits all-commits at lists.llvm.org
Tue Sep 22 12:23:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bc589bbb8d7d00f5939e9cd33cbe57e47d61f7e
      https://github.com/llvm/llvm-project/commit/2bc589bbb8d7d00f5939e9cd33cbe57e47d61f7e
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M flang/lib/Parser/basic-parsers.h

  Log Message:
  -----------
  [flang][msvc] Add explicit function template argument to applyFunction. NFC.

Msvc has difficulties deducing the template argument here. The error message is:
```
basic-parsers.h(790,12): error C2672: 'applyFunction': no matching overloaded function found
```
Explicitly pass the first template argument to help it.

This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D87961


  Commit: 97ca41e1ddfbb6812e2042dcbd2db6e0e7d0bc33
      https://github.com/llvm/llvm-project/commit/97ca41e1ddfbb6812e2042dcbd2db6e0e7d0bc33
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M flang/lib/Parser/expr-parsers.cpp

  Log Message:
  -----------
  [flang][msvc] Add explicit function template argument to applyLamda. NFC.

Like in D87961, msvc has difficulties deducing the template argument. The error message is:
```
expr-parsers.cpp(383): error C2672: 'applyLambda': no matching overloaded function found
```
Explicitly pass the first template argument to help it.

This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D88001


  Commit: 62afc3129dc28638d950c17117347b4e001a613d
      https://github.com/llvm/llvm-project/commit/62afc3129dc28638d950c17117347b4e001a613d
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M flang/lib/Semantics/symbol.cpp

  Log Message:
  -----------
  [flang][msvc] Explicitly reference "this" inside closure. NFC.

The Microsoft compiler seems to have difficulties to decide between a const/non-const method of a captured object context in a closure. The error message is:
```
symbol.cpp(261): error C2668: 'Fortran::semantics::Symbol::detailsIf': ambiguous call to overloaded function
symbol.h(535): note: could be 'const D *Fortran::semantics::Symbol::detailsIf<Fortran::semantics::DerivedTypeDetails>(void) const'
symbol.h(534): note: or       'D *Fortran::semantics::Symbol::detailsIf<Fortran::semantics::DerivedTypeDetails>(void)'
symbol.cpp(261): note: while trying to match the argument list '()'
```
Explicitly using the this-pointer resolves this problem.

This patch is part of the series to make flang compilable with MS Visual Studio <http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html>.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D88052


Compare: https://github.com/llvm/llvm-project/compare/ef7d22a98683...62afc3129dc2


More information about the All-commits mailing list