================
@@ -253,9 +253,15 @@ inline raw_ostream &operator<<(raw_ostream &OS,
ASTNodeKind K) {
class DynTypedNode {
public:
/// Creates a \c DynTypedNode from \c Node.
- template <typename T>
- static DynTypedNode create(const T &Node) {
- return BaseConverter<T>::create(Node);
+ template <typename T> static DynTypedNode create(const T &Node) {
+ using Converter = BaseConverter<T>;
+ static_assert(
+ Converter::StoresPointer ==
+ ASTNodeKind::getFromNodeKind<typename Converter::StoredType>()
----------------
zwuis wrote:
```suggestion
ASTNodeKind::getFromNodeKind<T>()
```
https://github.com/llvm/llvm-project/pull/237451
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits