minor simplifications

llvm-svn: 40176
This commit is contained in:
Chris Lattner 2007-07-21 05:33:26 +00:00
parent fd5e05f5ce
commit 0f4faa1a59
1 changed files with 2 additions and 2 deletions

View File

@ -195,13 +195,13 @@ bool Expr::hasLocalSideEffect() const {
///
Expr::isLvalueResult Expr::isLvalue() const {
// first, check the type (C99 6.3.2.1)
if (isa<FunctionType>(TR.getCanonicalType())) // from isObjectType()
if (TR->isFunctionType()) // from isObjectType()
return LV_NotObjectType;
if (TR->isIncompleteType() && TR->isVoidType())
return LV_IncompleteVoidType;
if (isa<ReferenceType>(TR.getCanonicalType())) // C++ [expr]
if (TR->isReferenceType()) // C++ [expr]
return LV_Valid;
// the type looks fine, now check the expression