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

2023-05-18 Thread Dustin Collins via Phabricator via cfe-commits
STREGA added a comment. I just hit this issue in my project. Here is intsafe.h from Windows 10 SDK 20348 (latest) F27520574: intsafe.h There are 3 macros with 128 bit suffixes; INT128_MAX, UINT128_MAX and INT128_MIN. I couldn't find any references to any of

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

2022-03-18 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D121497#3388870 , @aaron.ballman wrote: > In D121497#3388024 , @compnerd > wrote: > >> I don't have an example module sadly. It was something that I ran into with >> Swift code import

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

2022-03-17 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I don't know how "intsafe.h" looks like and how it is involved with the modules (it's not in winsdk.modulemap as far as I can tell). My immediate guess would be that "intsafe.h" doesn't include all the headers that are supposed to provide necessary macros. And if "intsa

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

2022-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In 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

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

2022-03-17 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a subscriber: vsapsai. iains added a comment. hmm that makes it quite hard to analyse what's going on ... .. however, it seems that this is a clang-modules style build (I am more familiar with the C++20 modules stuff, so probably @vsapsai will be able to throw more light on this). h

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

2022-03-16 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. 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. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

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

2022-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. could we see an example of the modular code that fails (and what flavour of modules compilation is being used)? or is there already a PR for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121497/new/ https://reviews.llv

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

2022-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: urnathan, iains, ChuanqiXu. aaron.ballman added a comment. In D121497#3383910 , @compnerd wrote: > This was something that I was hitting an issue with. Does cl hit the same issue when building a module that includes intsafe

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

2022-03-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. This was something that I was hitting an issue with. In particular, it was a module build for a module which pulled in intsafe.h. Now, given that it is a preprocessor macro, it would stand to reason that it will normally be dropped and thus won't matter if the fronte

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

2022-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > The Windows SDK has occurrences of the i128 and ui128 suffix (at least in the > 10.0.22000.0 SDK, see intsafe.h). This adds support for the extension to > properly lex the literal. Something fishy is still going on here. I definitely see the use in intsafe.h, b

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

2022-03-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Seems reasonable, this could use far more testing. Comment at: clang/test/Lexer/ms-extensions.c:27 +#define INT128_MAX 170141183460469231731687303715884105727i128 +#define UINT128_MAX 0xui128 + This seems li

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

2022-03-11 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: aaron.ballman. compnerd added a project: clang. Herald added a project: All. compnerd requested review of this revision. Herald added a subscriber: cfe-commits. The Windows SDK has occurrences of the `i128` and `ui128` suffix (at least in