From: Bill Wendling Date: Tue, 17 Jul 2007 04:47:36 +0000 (+0000) Subject: Return the correct type from isReferenceType(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=251dcaf8616c6f04051e214f35cadb7de42aef7e;p=clang Return the correct type from isReferenceType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39956 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(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;