]> granicus.if.org Git - clang/commitdiff
Return the correct type from isReferenceType().
authorBill Wendling <isanbard@gmail.com>
Tue, 17 Jul 2007 04:47:36 +0000 (04:47 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 17 Jul 2007 04:47:36 +0000 (04:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39956 91177308-0d34-0410-b5e6-96231b3b80d8

AST/Type.cpp
include/clang/AST/Type.h

index f083a73fdceb9ce382a36e871ae8b8aad54df925..e6aa6c8ae2a54c1e979c5520fefa4a1d765312c2 100644 (file)
@@ -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;
index 83d79df4a51b476d0810186ed93f98ff6b85ef9d..437eb48581cdc753f1c2a03f79accc320af74e42 100644 (file)
@@ -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;