We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891e115 commit 07fafa3Copy full SHA for 07fafa3
lib/Sema/TypeCheckType.cpp
@@ -1706,11 +1706,14 @@ namespace {
1706
public:
1707
/// Construct a never-null Type. If \p Ty is null, a fatal error is thrown.
1708
NeverNullType(Type Ty) : WrappedTy(Ty) {
1709
- if (Ty.isNull()) {
+ if (WrappedTy.isNull()) {
1710
llvm::report_fatal_error("Resolved to null type!");
1711
}
1712
1713
1714
+ /// Construct a never-null Type. If \p TyB is null, a fatal error is thrown.
1715
+ NeverNullType(TypeBase *TyB) : NeverNullType(Type(TyB)) {}
1716
+
1717
operator Type() const { return WrappedTy; }
1718
Type get() const { return WrappedTy; }
1719
0 commit comments