aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-10-22 04:14:44 +0000
committerDouglas Gregor <dgregor@apple.com>2008-10-22 04:14:44 +0000
commite0a5d5fe8eab573f7764bf6d2ddb02bee8dceaf9 (patch)
treecb58e5f0a282bc109e36a42da7ee7d4a626c3902 /lib/Sema/SemaType.cpp
parent4a76b292c9c3f60a257636e21d76b6ce1c12f8c4 (diff)
Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 942d7063a1..f1edabfa7e 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -500,23 +500,6 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S) {
return T;
}
-/// GetNonReferenceType - If Type is a reference type (e.g., const
-/// int&), returns the type that the reference refers to ("const
-/// int"). Otherwise, returns the type itself. This routine is used
-/// throughout to implement C++ 5p6:
-///
-/// If an expression initially has the type "reference to T" (8.3.2,
-/// 8.5.3), the type is adjusted to "T" prior to any further
-/// analysis, the expression designates the object or function
-/// denoted by the reference, and the expression is an lvalue.
-QualType Sema::GetNonReferenceType(QualType Type)
-{
- if (const ReferenceType *RefType = Type->getAsReferenceType())
- return RefType->getPointeeType();
- else
- return Type;
-}
-
/// ObjCGetTypeForMethodDefinition - Builds the type for a method definition
/// declarator
QualType Sema::ObjCGetTypeForMethodDefinition(DeclTy *D) {