[llvm-dev] Clang not able to parse large file

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 4 04:56:17 PDT 2021


Hi,

On Fri, 4 Jun 2021 at 07:34, Concept kulkarni via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> So I would like to know if I need to pass some special flag to parse large files or is there any limit to the file size that clang can parse.

I'm afraid not. It looks like the error is there because the buffer
overflows `unsigned` (i.e. 4GB) and Clang isn't 64-bit safe in all of
its processing (it even has a comment on the topic:
https://github.com/llvm/llvm-project/blob/fd3f2518a4fe3f9ee52d03eb519bd654c3ce4055/clang/lib/Basic/SourceManager.cpp#L140).

Tim.


More information about the llvm-dev mailing list