[ODRHash] Hash `RecordDecl` and diagnose discovered mismatches.
authorVolodymyr Sapsai <vsapsai@apple.com>
Fri, 2 Dec 2022 02:39:23 +0000 (18:39 -0800)
committerVolodymyr Sapsai <vsapsai@apple.com>
Thu, 19 Jan 2023 21:57:48 +0000 (15:57 -0600)
commit160bc160b9b114069a8cb9b4cc887aa86e5ca7c4
tree2bf5e66cafb5a616d21d4a856ab1fbc0bba62f58
parent9bdcf8778a5c6f57e6d05308e9dde655bba97698
[ODRHash] Hash `RecordDecl` and diagnose discovered mismatches.

When two modules contain struct/union with the same name, check the
definitions are equivalent and diagnose if they are not. This is similar
to `CXXRecordDecl` where we already discover and diagnose mismatches.

rdar://problem/56764293

Differential Revision: https://reviews.llvm.org/D71734
13 files changed:
clang/docs/ReleaseNotes.rst
clang/include/clang/AST/Decl.h
clang/include/clang/AST/DeclBase.h
clang/include/clang/AST/ODRDiagsEmitter.h
clang/include/clang/AST/ODRHash.h
clang/include/clang/Serialization/ASTReader.h
clang/lib/AST/Decl.cpp
clang/lib/AST/ODRDiagsEmitter.cpp
clang/lib/AST/ODRHash.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/Modules/compare-record.c [new file with mode: 0644]