[PATCH] D86465: [analyzer][solver] Redesign constraint ranges data structure

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 22 02:39:36 PDT 2021


steakhal added a comment.

In D86465#2640765 <https://reviews.llvm.org/D86465#2640765>, @vsavchenko wrote:

> I do have a bit of a struggle here.  This is a unit-test and thus should be compiled for all of the supported architectures by all of the supported compilers.
> Is there a `__has_feature` or something for me to check if `_ExtInt` can be used?

Aa, I get it. It is actually a clang specific extension. By checking git blame <https://github.com/llvm/llvm-project/commit/5f0903e9bec97e67bf34d887bcbe9d05790de934>, it seems to be a quite new feature, clang-11+.
What about something like this?

  using IntTypes = ::Types<int8_t, uint8_t, int16_t, uint16_t, int32_t,
                           uint32_t, int64_t, uint64_t
  #if defined(__clang__) && __clang_major__ >= 11
                           , __int128_t, __uint128_t
                           , signed _ExtInt(200)
                           , unsigned _ExtInt(200)
  #endif
  >;

https://godbolt.org/z/GfMfWEz88 Seems to work for a number of compilers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86465



More information about the cfe-commits mailing list