[PATCH] D121497: Lex: add support for `{,u}i128` Microsoft extension

Iain Sandoe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 04:38:19 PDT 2022


iains added a comment.

In D121497#3388870 <https://reviews.llvm.org/D121497#3388870>, @aaron.ballman wrote:

> In D121497#3388024 <https://reviews.llvm.org/D121497#3388024>, @compnerd wrote:
>
>> I don't have an example module sadly.  It was something that I ran into with Swift code import the WinSDK module defined in https://github.com/apple/swift/blob/main/stdlib/public/Platform/winsdk.modulemap.
>
> Could this be the reproducer? https://godbolt.org/z/YbbMse9a4

For C++20 modules, the basic rejection of this code is correct; we told the compiler it was a module but the source is not a valid module file  (the first non-comment token needs to be  a module/expoert decl).
The diagnostic is not especially friendly - but it does not seem to me that the example involves any attempt to expand the macro - it is perhaps poor recovery from the initial error.

So, I m not sure if we've explained the original problem yet - or whether other modules "flavours" would permit a non-module directive to precede any valid one (I suspect that modules-ts has a more flexible allowance, where there is an implicit global module fragment)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121497



More information about the llvm-commits mailing list