Skip to content

Commit 9433cd2

Browse files
committed
Assert that type parameter is not empty in TypeAndName
1 parent bad9b38 commit 9433cd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bindgen/ir/TypeAndName.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#include <clang/Tooling/Tooling.h>
33

44
TypeAndName::TypeAndName(std::string name, std::shared_ptr<Type> type)
5-
: name(std::move(name)), type(std::move(type)) {}
5+
: name(std::move(name)), type(std::move(type)) {
6+
assert(this->type);
7+
}
68

79
std::shared_ptr<Type> TypeAndName::getType() const { return type; }
810

0 commit comments

Comments
 (0)