[clang] Insert headers in global module fragment (PR #151624)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 2 21:09:32 PDT 2025


================
@@ -115,6 +134,7 @@ unsigned getOffsetAfterHeaderGuardsAndComments(StringRef FileName,
               return SM.getFileOffset(Tok.getLocation());
             return 0;
           }));
+  return std::max(HeaderAndPPOffset, ModuleDecl);
----------------
HighCommander4 wrote:

Technically, this function is no longer doing what its name says, `getOffsetAfterHeaderGuardsAndComments`.

Can we rename it to `getMinHeaderInsertionOffset`?

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


More information about the cfe-commits mailing list