[clang] [AST] Assert that FoldingSetNodeID used for hint is correct upon insertion (PR #157692)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 17 02:13:07 PDT 2025
ilya-biryukov wrote:
+1 for the inline helper. But if we go down that path, maybe we could add an optional parameter to `InsertNode` and make it the helper we're talking about?
```cpp
[[always_inline]] Ret InsertNode(<args>, llvm::FoldingSetNodeID* IDForAssert = nullptr) {
assert(!IDForAssert || IDForAssert == ...);
return InsertNodeImpl(<args>);
}
```
https://github.com/llvm/llvm-project/pull/157692
More information about the cfe-commits
mailing list