[cfe-commits] r65031 - in /cfe/trunk: include/clang/AST/Type.h lib/AST/Type.cpp

Daniel Dunbar daniel at zuster.org
Wed Feb 18 23:11:27 PST 2009


Author: ddunbar
Date: Thu Feb 19 01:11:26 2009
New Revision: 65031

URL: http://llvm.org/viewvc/llvm-project?rev=65031&view=rev
Log:
Add Type::getAsFunctionNoProto

Modified:
    cfe/trunk/include/clang/AST/Type.h
    cfe/trunk/lib/AST/Type.cpp

Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=65031&r1=65030&r2=65031&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Thu Feb 19 01:11:26 2009
@@ -63,6 +63,7 @@
   class TypedefType;
   class TemplateTypeParmType;
   class FunctionType;
+  class FunctionTypeNoProto;
   class FunctionTypeProto;
   class ExtVectorType;
   class BuiltinType;
@@ -396,6 +397,7 @@
   // 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;

Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=65031&r1=65030&r2=65031&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Thu Feb 19 01:11:26 2009
@@ -216,6 +216,10 @@
   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());
 }





More information about the cfe-commits mailing list