[clang] [clang-tools-extra] [clang][Serialization] Serialize DiagStateOnPushStack to fix pragma d… (PR #190420)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 13:06:09 PDT 2026
https://github.com/ArcsinX commented:
Hello.
This patch fixes the `#pragma clang diagnostic` issue, but we still have other similar issues with pragmas, such as `#pragma pack(push, n)` / `#pragma pack(pop)`
Maybe the preamble should not include `#pragma`s, which would solve all such issues? However, if the pragma is at the beginning of the file, we lose preamble optimization, but this can be attributed to the issue of unsupported non-self-contained files (i.e. if a header in include section requires a pragma before, this is not a self-contained header). There is a separat issue for this https://github.com/clangd/clangd/issues/45
https://github.com/llvm/llvm-project/pull/190420
More information about the cfe-commits
mailing list