[cfe-commits] r75477 - in /cfe/trunk/lib: CodeGen/CodeGenTypes.cpp Sema/SemaDecl.cpp Sema/SemaExpr.cpp Sema/SemaExprObjC.cpp
Steve Naroff
snaroff at apple.com
Mon Jul 13 10:19:15 PDT 2009
Author: snaroff
Date: Mon Jul 13 12:19:15 2009
New Revision: 75477
URL: http://llvm.org/viewvc/llvm-project?rev=75477&view=rev
Log:
Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314.
Still more to come...just wanted to get the no-brainers out of the way.
Modified:
cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaExprObjC.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=75477&r1=75476&r2=75477&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Mon Jul 13 12:19:15 2009
@@ -215,7 +215,6 @@
const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
const clang::Type &Ty = *Context.getCanonicalType(T);
- //T->dump();
switch (Ty.getTypeClass()) {
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=75477&r1=75476&r2=75477&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon Jul 13 12:19:15 2009
@@ -528,7 +528,6 @@
// Install the built-in type for 'id', ignoring the current definition.
New->setTypeForDecl(Context.getObjCIdType().getTypePtr());
return;
- break;
case 5:
if (!TypeID->isStr("Class"))
break;
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=75477&r1=75476&r2=75477&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Jul 13 12:19:15 2009
@@ -2226,7 +2226,7 @@
}
// Handle properties on ObjC 'Class' types.
- if (OpKind == tok::period && (BaseType->isObjCClassType())) {
+ if (OpKind == tok::period && BaseType->isObjCClassType()) {
// Also must look for a getter name which uses property syntax.
Selector Sel = PP.getSelectorTable().getNullarySelector(&Member);
if (ObjCMethodDecl *MD = getCurMethodDecl()) {
@@ -3917,12 +3917,7 @@
// Either ptr - int or ptr - ptr.
if (lex->getType()->isPointerType() ||
lex->getType()->isObjCObjectPointerType()) {
- QualType lpointee;
- if (const PointerType *LHSPTy = lex->getType()->getAsPointerType())
- lpointee = LHSPTy->getPointeeType();
- else if (const ObjCObjectPointerType *OPT =
- lex->getType()->getAsObjCObjectPointerType())
- lpointee = OPT->getPointeeType();
+ QualType lpointee = lex->getType()->getPointeeType();
// The LHS must be an completely-defined object type.
@@ -4295,15 +4290,11 @@
<< lType << rType << lex->getSourceRange() << rex->getSourceRange();
}
if (lType->isObjCQualifiedIdType() && rType->isObjCQualifiedIdType()) {
- if (ObjCQualifiedIdTypesAreCompatible(lType, rType, true)) {
- ImpCastExprToType(rex, lType);
- return ResultTy;
- } else {
+ if (!ObjCQualifiedIdTypesAreCompatible(lType, rType, true))
Diag(Loc, diag::warn_incompatible_qualified_id_operands)
<< lType << rType << lex->getSourceRange() << rex->getSourceRange();
- ImpCastExprToType(rex, lType);
- return ResultTy;
- }
+ ImpCastExprToType(rex, lType);
+ return ResultTy;
}
ImpCastExprToType(rex, lType);
return ResultTy;
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=75477&r1=75476&r2=75477&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Mon Jul 13 12:19:15 2009
@@ -765,7 +765,6 @@
if (!ClassImplementsProtocol(*I, rhsID, true))
return false;
}
- return true;
}
// If there are no qualifiers and no interface, we have an 'id'.
return true;
More information about the cfe-commits
mailing list