From: Daniel Dunbar Date: Thu, 19 Feb 2009 07:11:26 +0000 (+0000) Subject: Add Type::getAsFunctionNoProto X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afa74448a07a16c3146accbe0ff03e9c8b0995e5;p=clang Add Type::getAsFunctionNoProto git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 7554b697e3..c47b94053e 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -63,6 +63,7 @@ namespace clang { class TypedefType; class TemplateTypeParmType; class FunctionType; + class FunctionTypeNoProto; class FunctionTypeProto; class ExtVectorType; class BuiltinType; @@ -396,6 +397,7 @@ public: // the best type we can. const BuiltinType *getAsBuiltinType() const; const FunctionType *getAsFunctionType() const; + const FunctionTypeNoProto *getAsFunctionTypeNoProto() const; const FunctionTypeProto *getAsFunctionTypeProto() const; const PointerLikeType *getAsPointerLikeType() const; // Pointer or Reference. const PointerType *getAsPointerType() const; diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 53363c15ec..8032424f78 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -216,6 +216,10 @@ const FunctionType *Type::getAsFunctionType() const { return getDesugaredType()->getAsFunctionType(); } +const FunctionTypeNoProto *Type::getAsFunctionTypeNoProto() const { + return dyn_cast_or_null(getAsFunctionType()); +} + const FunctionTypeProto *Type::getAsFunctionTypeProto() const { return dyn_cast_or_null(getAsFunctionType()); }