[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:552-553 bit LateParsed = 0; + // Set to true for attributes that should participate in ODR hashing. + bit IsODRHashable = 0; // Set to false to prevent an attribute from being propagated fr

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D138859#3958958 , @vsapsai wrote: > In D138859#3955806 , @ChuanqiXu > wrote: > >> And I think we should add tests for this. e.g., in the ASTImporterTests.cpp. > > I'm not sure which

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D138859#3955806 , @ChuanqiXu wrote: > And I think we should add tests for this. e.g., in the ASTImporterTests.cpp. I'm not sure which test would be useful in this case. We kinda already test that different modules agree which

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:552-553 bit LateParsed = 0; + // Set to true for attributes that should participate in ODR hashing. + bit IsODRHashable = 0; // Set to false to prevent an attribute from being propagated fr

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D138859#3955578 , @vsapsai wrote: > In D138859#3954975 , @erichkeane > wrote: > >> The hash there isn't the problem, its that you're adding a field to Attr.td >> that isn't serializ

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D138859#3954975 , @erichkeane wrote: > The hash there isn't the problem, its that you're adding a field to Attr.td > that isn't serialized in ASTWriter/ASTReader. That's a good point. Sorry I haven't realized it at first and

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. The hash there isn't the problem, its that you're adding a field to Attr.td that isn't serialized in ASTWriter/ASTReader. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138859/new/ https://reviews.llvm.org/D138859 _

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D138859#3954943 , @erichkeane wrote: > I dont have a concern on this in general, but does it cause problems with > modules built? I would think this flag needs to be written in > ASTWriter/picked back up. For an attribute

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. This patch builds on top of D135472 and aims to show that hashing attributes with TableGen works fine and doesn't have unexpected problems. As the next step I plan to hash more attributes. Though there is one question regarding argume

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I dont have a concern on this in general, but does it cause problems with modules built? I would think this flag needs to be written in ASTWriter/picked back up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138859/new

[PATCH] D138859: [ODRHash] Drive attribute hashing through TableGen. NFC intended.

2022-11-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: aaron.ballman, ChuanqiXu, erichkeane. Herald added a subscriber: ributzka. Herald added a project: All. vsapsai requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In this change deliberat