diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-04-07 06:52:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-04-07 06:52:53 +0000 |
| commit | 7460fd297dc401697f28fd540513331ff22f1345 (patch) | |
| tree | 2831e714d24442d276cfd5e80c79d3b2423060e4 /clang/lib/AST/ASTContext.cpp | |
| parent | 49af6a4bebb6e0891980c75cd21336a4473844b3 (diff) | |
| download | bcm5719-llvm-7460fd297dc401697f28fd540513331ff22f1345.tar.gz bcm5719-llvm-7460fd297dc401697f28fd540513331ff22f1345.zip | |
simplify reference handling.
llvm-svn: 49325
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 187871b32e0..e781040172c 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1468,23 +1468,6 @@ bool ASTContext::pointerTypesAreCompatible(QualType lhs, QualType rhs) { return typesAreCompatible(ltype, rtype); } -// C++ 5.17p6: When the left operand of an assignment operator denotes a -// reference to T, the operation assigns to the object of type T denoted by the -// reference. -bool ASTContext::referenceTypesAreCompatible(QualType lhs, QualType rhs) { - QualType ltype = lhs; - - if (lhs->isReferenceType()) - ltype = cast<ReferenceType>(lhs.getCanonicalType())->getPointeeType(); - - QualType rtype = rhs; - - if (rhs->isReferenceType()) - rtype = cast<ReferenceType>(rhs.getCanonicalType())->getPointeeType(); - - return typesAreCompatible(ltype, rtype); -} - bool ASTContext::functionTypesAreCompatible(QualType lhs, QualType rhs) { const FunctionType *lbase = cast<FunctionType>(lhs.getCanonicalType()); const FunctionType *rbase = cast<FunctionType>(rhs.getCanonicalType()); |

