Page MenuHomePhabricator

[flang][msvc] Avoid range-based for over initializer_list. NFC.

Authored by Meinersbur on Aug 23 2020, 8:05 PM.



Msvc crashes with "INTERNAL COMPILER ERROR" when iterating over an std::initializer_list in a constexpr constructor. Explicitly use the iterator instead.

This patch is part of the series to make flang compilable with MS Visual Studio.

Diff Detail

Event Timeline

Meinersbur created this revision.Aug 23 2020, 8:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
isuruf accepted this revision.Aug 24 2020, 2:35 PM
This revision is now accepted and ready to land.Aug 24 2020, 2:35 PM
tskeith added inline comments.Sep 8 2020, 8:11 AM

To match the style of the flang project this should be:
for (auto it{enums.begin()}; it != enums.end(); ++it) {

Meinersbur updated this revision to Diff 290628.Sep 8 2020, 7:58 PM

Apply @tskeith's style recommendation

This revision was automatically updated to reflect the committed changes.
Meinersbur marked an inline comment as done.