[cfe-commits] r73043 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/Sema/SemaExpr.cpp
Eli Friedman
eli.friedman at gmail.com
Sun Jun 7 22:08:56 PDT 2009
Author: efriedma
Date: Mon Jun 8 00:08:54 2009
New Revision: 73043
URL: http://llvm.org/viewvc/llvm-project?rev=73043&view=rev
Log:
Delete method which is now trivial.
Modified:
cfe/trunk/include/clang/AST/ASTContext.h
cfe/trunk/lib/AST/ASTContext.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=73043&r1=73042&r2=73043&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Mon Jun 8 00:08:54 2009
@@ -696,7 +696,6 @@
/// Compatibility predicates used to check assignment expressions.
bool typesAreCompatible(QualType, QualType); // C99 6.2.7p1
- bool typesAreBlockCompatible(QualType lhs, QualType rhs);
bool isObjCIdType(QualType T) const {
return T == ObjCIdType;
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=73043&r1=73042&r2=73043&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Jun 8 00:08:54 2009
@@ -2838,24 +2838,6 @@
// Type Compatibility Testing
//===----------------------------------------------------------------------===//
-/// typesAreBlockCompatible - This routine is called when comparing two
-/// block types. Types must be strictly compatible here. For example,
-/// C unfortunately doesn't produce an error for the following:
-///
-/// int (*emptyArgFunc)();
-/// int (*intArgList)(int) = emptyArgFunc;
-///
-/// For blocks, we will produce an error for the following (similar to C++):
-///
-/// int (^emptyArgBlock)();
-/// int (^intArgBlock)(int) = emptyArgBlock;
-///
-/// FIXME: When the dust settles on this integration, fold this into mergeTypes.
-///
-bool ASTContext::typesAreBlockCompatible(QualType lhs, QualType rhs) {
- return !mergeTypes(lhs, rhs).isNull();
-}
-
/// areCompatVectorTypes - Return true if the two specified vector types are
/// compatible.
static bool areCompatVectorTypes(const VectorType *LHS,
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=73043&r1=73042&r2=73043&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Jun 8 00:08:54 2009
@@ -3003,8 +3003,8 @@
compositeType = Context.getObjCIdType();
} else if (LHSBPT || RHSBPT) {
if (!sameKind
- || !Context.typesAreBlockCompatible(lhptee.getUnqualifiedType(),
- rhptee.getUnqualifiedType()))
+ || !Context.typesAreCompatible(lhptee.getUnqualifiedType(),
+ rhptee.getUnqualifiedType()))
Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands)
<< LHSTy << RHSTy << LHS->getSourceRange() << RHS->getSourceRange();
return QualType();
@@ -3218,7 +3218,7 @@
if (lhptee.getCVRQualifiers() != rhptee.getCVRQualifiers())
ConvTy = CompatiblePointerDiscardsQualifiers;
- if (!Context.typesAreBlockCompatible(lhptee, rhptee))
+ if (!Context.typesAreCompatible(lhptee, rhptee))
return IncompatibleBlockPointer;
return ConvTy;
}
@@ -3978,7 +3978,7 @@
QualType rpointee = rType->getAsBlockPointerType()->getPointeeType();
if (!LHSIsNull && !RHSIsNull &&
- !Context.typesAreBlockCompatible(lpointee, rpointee)) {
+ !Context.typesAreCompatible(lpointee, rpointee)) {
Diag(Loc, diag::err_typecheck_comparison_of_distinct_blocks)
<< lType << rType << lex->getSourceRange() << rex->getSourceRange();
}
More information about the cfe-commits
mailing list