summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/Type.h2
-rw-r--r--clang/lib/AST/Type.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h
index 7554b697e3c..c47b94053eb 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 53363c15eca..8032424f782 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<FunctionTypeNoProto>(getAsFunctionType());
+}
+
const FunctionTypeProto *Type::getAsFunctionTypeProto() const {
return dyn_cast_or_null<FunctionTypeProto>(getAsFunctionType());
}
OpenPOWER on IntegriCloud