stub clang::BuiltinType::NullPtr primitive type

Summary: Adding support for the nullptr clang type (clang::BuiltinType::NullPtr). While there I augmented the exception message to include the type name that is missing.

Differential Revision: D53272742
This commit is contained in:
Jonathan Haslam 2024-01-31 09:40:39 -08:00 committed by Facebook Community Bot
parent db289c1a1a
commit 2e8edd78b5

View File

@ -405,10 +405,15 @@ Primitive& ClangTypeParser::enumeratePrimitive(const clang::BuiltinType& ty) {
case clang::BuiltinType::LongDouble: case clang::BuiltinType::LongDouble:
return makeType<Primitive>(ty, Primitive::Kind::Float64); return makeType<Primitive>(ty, Primitive::Kind::Float64);
case clang::BuiltinType::NullPtr:
return makeType<Primitive>(ty, Primitive::Kind::StubbedPointer);
case clang::BuiltinType::UInt128: case clang::BuiltinType::UInt128:
case clang::BuiltinType::Int128: case clang::BuiltinType::Int128:
default: default:
throw std::logic_error(std::string("unsupported BuiltinType::Kind")); throw std::logic_error(std::string("unsupported BuiltinType::Kind") +
" " +
ty.getNameAsCString(ast->getPrintingPolicy()));
} }
} }