[clang] [Clang] Report an error and crash on source location exhaustion in macros (PR #69908)

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 23 03:00:05 PDT 2023


================
@@ -356,6 +356,8 @@ def err_file_modified : Error<
   "file '%0' modified since it was first processed">, DefaultFatal;
 def err_file_too_large : Error<
   "sorry, unsupported: file '%0' is too large for Clang to process">;
+def err_expansions_too_large : Error<
----------------
sam-mccall wrote:

FWIW, I'm not sure the *why* matters much: this is ~always going to be the sum of thousands of tiny things. So we could consider merging err_expansions_too_large and err_include_too_large. (And also emitting that in ASTReader.cpp above remark_sloc_usage).
But I don't feel strongly.

https://github.com/llvm/llvm-project/pull/69908


More information about the cfe-commits mailing list