HomePhabricator

[flang][msvc] Fix lambda capture ambiguity. NFC.

Authored by Meinersbur on Oct 23 2020, 8:24 PM.

Description

[flang][msvc] Fix lambda capture ambiguity. NFC.

Patch D88695 introduces a new local variable inside a lambda with the same name as a variable outside of it. In some of the if constexpr regions, msvc prioritizes the outer declaration and emits the error.

C:\Users\meinersbur\src\llvm-project\flang\lib\Evaluate\fold-implementation.h(1200): error C3493: 'context' cannot be implicitly captured because no default capture mode has been specified

This is fixed by giving the inner variable a different name.

Reviewed By: klausler

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

Details

Committed
MeinersburOct 23 2020, 8:58 PM
Reviewer
klausler
Differential Revision
D89367: [flang][msvc] Fix lambda capture ambiguity. NFC.
Parents
rGb57937861f68: [flang][windows] Support platform-specific path separator.
Branches
Unknown
Tags
Unknown