[PATCH] D85937: [flang][msvc] Split class declaration and constexpr variable definition. NFC.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 14:33:26 PDT 2020


Meinersbur created this revision.
Meinersbur added reviewers: DavidTruby, sscalpone, isuruf, AlexisPerry, klausler, tskeith.
Meinersbur added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Meinersbur requested review of this revision.

Msvc has trouble defining a struct/class and defining a constexpr symbol in the same declarator. It reports the following error:

  basic-parsers.h(809): error C2131: expression did not evaluate to a constant
  basic-parsers.h(809): note: failure was caused by call of undefined function or one not declared 'constexpr'
  basic-parsers.h(809): note: see usage of 'Fortran::parser::OkParser::OkParser'

Fix the msvc compilation by splitting the two definitions into two separate declarators.

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>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85937

Files:
  flang/lib/Parser/basic-parsers.h
  flang/lib/Parser/expr-parsers.cpp
  flang/lib/Parser/token-parsers.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85937.285497.patch
Type: text/x-patch
Size: 8191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200813/e2ad5ca3/attachment.bin>


More information about the llvm-commits mailing list