From f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8 Mon Sep 17 00:00:00 2001 From: rdivacky <rdivacky@FreeBSD.org> Date: Thu, 15 Jul 2010 17:07:12 +0000 Subject: Update clang to r108428. --- lib/AST/DeclTemplate.cpp | 2 +- lib/AST/Expr.cpp | 2 ++ lib/AST/ExprConstant.cpp | 1 + lib/AST/Type.cpp | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/AST') diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp index f00eb04..9e1d79d 100644 --- a/lib/AST/DeclTemplate.cpp +++ b/lib/AST/DeclTemplate.cpp @@ -223,7 +223,7 @@ ClassTemplateDecl::getInjectedClassNameSpecialization() { } else if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*Param)) { Expr *E = new (Context) DeclRefExpr(NTTP, - NTTP->getType().getNonReferenceType(), + NTTP->getType().getNonLValueExprType(Context), NTTP->getLocation()); TemplateArgs.push_back(TemplateArgument(E)); } else { diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index bd97b88..6524a31 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -684,6 +684,8 @@ const char *CastExpr::getCastKindName() const { return "Unknown"; case CastExpr::CK_BitCast: return "BitCast"; + case CastExpr::CK_LValueBitCast: + return "LValueBitCast"; case CastExpr::CK_NoOp: return "NoOp"; case CastExpr::CK_BaseToDerived: diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index a963182..3c97420 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -563,6 +563,7 @@ bool PointerExprEvaluator::VisitCastExpr(CastExpr* E) { case CastExpr::CK_NoOp: case CastExpr::CK_BitCast: + case CastExpr::CK_LValueBitCast: case CastExpr::CK_AnyPointerToObjCPointerCast: case CastExpr::CK_AnyPointerToBlockPointerCast: return Visit(SubExpr); diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index ab64eaf..d7929304 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -992,7 +992,7 @@ const char *BuiltinType::getName(const LangOptions &LO) const { void FunctionType::ANCHOR() {} // Key function for FunctionType. -QualType QualType::getCallResultType(ASTContext &Context) const { +QualType QualType::getNonLValueExprType(ASTContext &Context) const { if (const ReferenceType *RefType = getTypePtr()->getAs<ReferenceType>()) return RefType->getPointeeType(); @@ -1002,7 +1002,7 @@ QualType QualType::getCallResultType(ASTContext &Context) const { // // See also C99 6.3.2.1p2. if (!Context.getLangOptions().CPlusPlus || - !getTypePtr()->isDependentType() && !getTypePtr()->isRecordType()) + (!getTypePtr()->isDependentType() && !getTypePtr()->isRecordType())) return getUnqualifiedType(); return *this; -- cgit v1.1