Supporting arbitrary precision integer type in clang on local branch

Hi clang developers,

I am working on supporting arbitrary precision integer type in clang on local branch. Specifically, I am going to introduce a “bitwidth” like: “int attribute_((bitwidth(N)))”, and directly generate llvm type iN.

Currently I am thinking of two options:

  1. Support the new attribute similar to the “address space”

  2. Create a new “APIntegerType” as a subclass of clang AST Type.

Do you know which option is better/more simple?

Thanks a lot

Hongbin