diff options
-rw-r--r-- | slang_rs_export_type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/slang_rs_export_type.cpp b/slang_rs_export_type.cpp index d73f866..d0b6094 100644 --- a/slang_rs_export_type.cpp +++ b/slang_rs_export_type.cpp @@ -678,7 +678,7 @@ bool RSExportType::ValidateType(slang::RSContext *Context, clang::ASTContext &C, // If this is an externally visible variable declaration, we check if the // type is able to be exported first. - if (auto VD = llvm::dyn_cast<clang::VarDecl>(ND)) { + if (auto VD = llvm::dyn_cast_or_null<clang::VarDecl>(ND)) { if (VD->getFormalLinkage() == clang::ExternalLinkage) { if (!TypeExportable(T, Context, VD)) { return false; |