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 7554b69..c47b940 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -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;
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 53363c1..8032424 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -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());
}