From 5c275a94fbce930568cecc3aa3f94ae1fe78c67d Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 19 Feb 2009 07:11:26 +0000 Subject: [PATCH] Add Type::getAsFunctionNoProto llvm-svn: 65031 --- clang/include/clang/AST/Type.h | 2 ++ clang/lib/AST/Type.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 7554b697e3c4..c47b94053eb6 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/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/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 53363c15eca4..8032424f7824 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/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()); }