[AST] Wrap converted clang::FunctionType values in clang::PointerType.

This commit is contained in:
Varun Gandhi
2019-12-12 14:24:46 -08:00
parent c25bea5da5
commit eabe7bcc76
4 changed files with 16 additions and 10 deletions

View File

@@ -2925,8 +2925,11 @@ public:
friend ExtInfo;
friend class AnyFunctionType;
friend class FunctionType;
// We preserve a full clang::Type *, not a clang::FunctionType *, so
// we can keep sugar in case we need to present an error to the user.
// We preserve a full clang::Type *, not a clang::FunctionType * as:
// 1. We need to keep sugar in case we need to present an error to the user.
// 2. The actual type being stored is [ignoring sugar] either a
// clang::PointerType or a clang::BlockPointerType which points to a
// clang::FunctionType.
const clang::Type *ClangFunctionType;
bool empty() const { return !ClangFunctionType; }