aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-10-03 01:08:28 +0000
committerJordan Rose <jordan_rose@apple.com>2012-10-03 01:08:28 +0000
commit041ce8e00afd1185549a25d5c2b97d219ae032d9 (patch)
tree2822099dd1b8e0266c4aa27d3ca543290fa1022c /include/clang
parent6b2cc42f1504db6577fd67fa55ef023254744e2c (diff)
Teach getCXXRecordDeclForPointerType about references.
Then, rename it getPointeeCXXRecordDecl and give it a nice doc comment, and actually use it. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/Type.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 7b903b315c..1950751ace 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -1675,13 +1675,19 @@ public:
const ObjCObjectPointerType *getAsObjCQualifiedIdType() const;
const ObjCObjectPointerType *getAsObjCQualifiedClassType() const;
const ObjCObjectType *getAsObjCQualifiedInterfaceType() const;
- const CXXRecordDecl *getCXXRecordDeclForPointerType() const;
/// \brief Retrieves the CXXRecordDecl that this type refers to, either
/// because the type is a RecordType or because it is the injected-class-name
/// type of a class template or class template partial specialization.
CXXRecordDecl *getAsCXXRecordDecl() const;
+ /// If this is a pointer or reference to a RecordType, return the
+ /// CXXRecordDecl that that type refers to.
+ ///
+ /// If this is not a pointer or reference, or the type being pointed to does
+ /// not refer to a CXXRecordDecl, returns NULL.
+ const CXXRecordDecl *getPointeeCXXRecordDecl() const;
+
/// \brief Get the AutoType whose type will be deduced for a variable with
/// an initializer of this type. This looks through declarators like pointer
/// types, but not through decltype or typedefs.