[PATCH] D154016: [clang][modules] Avoid serializing all diag mappings in non-deterministic order

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 09:49:20 PDT 2023


steven_wu added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:3016
       for (const auto &I : *State) {
-        if (I.second.isPragma() || IncludeNonPragmaStates) {
-          Record.push_back(I.first);
-          Record.push_back(I.second.serialize());
-        }
+        // Maybe skip non-pragmas.
+        if (!I.second.isPragma() && !IncludeNonPragmaStates)
----------------
Is pragma in this context refer to `#pragma diagnostics push/pop`? Do we have test to cover those to be deterministic?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154016



More information about the cfe-commits mailing list