]> granicus.if.org Git - clang/commitdiff
Add Type::getAsFunctionNoProto
authorDaniel Dunbar <daniel@zuster.org>
Thu, 19 Feb 2009 07:11:26 +0000 (07:11 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 19 Feb 2009 07:11:26 +0000 (07:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h
lib/AST/Type.cpp

index 7554b697e3c416f2b4d58056bced8acb363ec9ac..c47b94053eb64139f6989404d2c834a7cc2dc85f 100644 (file)
@@ -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;
index 53363c15eca49f096e3f4ba6c1ef74e460be1c70..8032424f7824308089fb257a9aea7174d54beb35 100644 (file)
@@ -216,6 +216,10 @@ const FunctionType *Type::getAsFunctionType() const {
   return getDesugaredType()->getAsFunctionType();
 }
 
+const FunctionTypeNoProto *Type::getAsFunctionTypeNoProto() const {
+  return dyn_cast_or_null<FunctionTypeNoProto>(getAsFunctionType());
+}
+
 const FunctionTypeProto *Type::getAsFunctionTypeProto() const {
   return dyn_cast_or_null<FunctionTypeProto>(getAsFunctionType());
 }