From 17aeeeb3117fa97c0587a1dadd36010e5fb470ca Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 8 Jun 2013 18:19:52 +0000 Subject: Revert "[Sema] Make FunctionType's TSI use unadjusted argument types" This reverts commit r183614. It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms, and the fix is not trivial. llvm-svn: 183616 --- clang/lib/AST/ASTContext.cpp | 15 --------------- clang/lib/AST/Type.cpp | 6 ++---- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'clang/lib/AST') diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 384164167db..44ff94e3584 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4142,21 +4142,6 @@ const ArrayType *ASTContext::getAsArrayType(QualType T) const { } QualType ASTContext::getAdjustedParameterType(QualType T) const { - // In ARC, infer a lifetime qualifier for appropriate parameter types. - if (getLangOpts().ObjCAutoRefCount && - T.getObjCLifetime() == Qualifiers::OCL_None && - T->isObjCLifetimeType()) { - // Special cases for arrays: - // - if it's const, use __unsafe_unretained - // - otherwise, it's an error - Qualifiers::ObjCLifetime lifetime; - if (T->isArrayType()) - lifetime = Qualifiers::OCL_ExplicitNone; - else - lifetime = T->getObjCARCImplicitLifetime(); - T = getLifetimeQualifiedType(T, lifetime); - } - // C99 6.7.5.3p7: // A declaration of a parameter as "array of type" shall be // adjusted to "qualified pointer to type", where the type diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 2c5233bce67..c32df11b667 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -1781,10 +1781,8 @@ bool TypeOfExprType::isSugared() const { } QualType TypeOfExprType::desugar() const { - if (isSugared()) { - Expr *E = getUnderlyingExpr(); - return E->getType(); - } + if (isSugared()) + return getUnderlyingExpr()->getType(); return QualType(this, 0); } -- cgit v1.2.3