aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-07-17 04:47:36 +0000
committerBill Wendling <isanbard@gmail.com>2007-07-17 04:47:36 +0000
commit251dcaf8616c6f04051e214f35cadb7de42aef7e (patch)
treec59acec5ea0825e6270a89b24feb55c0526c6e3e
parentea5e79f930bcab2087646d1cb4fc1fe9dcf986a1 (diff)
Return the correct type from isReferenceType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39956 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--AST/Type.cpp2
-rw-r--r--include/clang/AST/Type.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/AST/Type.cpp b/AST/Type.cpp
index f083a73fdc..e6aa6c8ae2 100644
--- a/AST/Type.cpp
+++ b/AST/Type.cpp
@@ -72,7 +72,7 @@ const PointerType *Type::isPointerType() const {
return 0;
}
-bool Type::isReferenceType() const {
+const ReferenceType *Type::isReferenceType() const {
// If this is directly a reference type, return it.
if (const ReferenceType *RTy = dyn_cast<ReferenceType>(this))
return RTy;
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 83d79df4a5..437eb48581 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -33,6 +33,7 @@ namespace clang {
class Expr;
class SourceLocation;
class PointerType;
+ class ReferenceType;
class VectorType;
/// QualType - For efficiency, we don't store CVR-qualified types as nodes on
@@ -235,7 +236,7 @@ public:
/// Derived types (C99 6.2.5p20). isFunctionType() is also a derived type.
bool isDerivedType() const;
const PointerType *isPointerType() const;
- bool isReferenceType() const;
+ const ReferenceType *isReferenceType() const;
bool isArrayType() const;
bool isStructureType() const;
bool isUnionType() const;