[clang] [AST] Assert that FoldingSetNodeID used for hint is correct upon insertion (PR #157692)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 16 10:46:31 PDT 2025
erichkeane wrote:
What if we replace the calls to `insertNode` with a helper function macro instead? So:
`InsertNode(VectorTypes, ID, New, InsertPos);`
Which is then:
`#define InsertNode(Ty, ID, Elt, Pos) assert(<call to helper>);Ty.InsertNode(Ty, Pos);`
Sensible? Or presumably we can have an always-inline function wrapper for that, and the inliner will just take care of it.
https://github.com/llvm/llvm-project/pull/157692
More information about the cfe-commits
mailing list