brandonxin wrote:
@ChuanqiXu9 I want to clarify that these are not the same kind of issue, and
this patch is not a workaround:
- This patch fixes a serialization gap: `DiagStateOnPushStack` was simply never
serialized in PCH, unlike all other pragma stacks (e.g. `AlignPackStack` is
already serialized via `WritePackPragmaOptions`). This is completing missing
serialization, not working around anything.
- The `#pragma pack` issue that @ArcsinX raised has a completely different root
cause. The pack stack IS correctly serialized and `#pragma pack(pop)` works
fine in the main file. The spurious warning comes from
`DiagnoseUnterminatedPragmaAlignPack()` running at end of preamble compilation,
which doesn't know it's compiling a partial file. That would need a different
fix (e.g. suppressing that diagnostic during preamble generation).
These are two distinct bugs with different root causes requiring different
fixes. A "general mechanism" isn't applicable here because the mechanisms are
already different.
https://github.com/llvm/llvm-project/pull/190420
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits