aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-19 07:11:26 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-19 07:11:26 +0000
commitafa74448a07a16c3146accbe0ff03e9c8b0995e5 (patch)
tree7fb6aa9497d5f1e58a355efad75199f15e83b733
parentf82328852c80a51b36a146de6ef5fd5b15e72c37 (diff)
Add Type::getAsFunctionNoProto
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Type.h2
-rw-r--r--lib/AST/Type.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 7554b697e3..c47b94053e 100644
--- a/include/clang/AST/Type.h
+++ b/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/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 53363c15ec..8032424f78 100644
--- a/lib/AST/Type.cpp
+++ b/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());
}