diff options
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 7 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 3 | ||||
-rw-r--r-- | lib/Sema/TreeTransform.h | 1 |
7 files changed, 2 insertions, 15 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index ba1c3b0f40..200f975d74 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -601,8 +601,6 @@ static TryCastResult TryStaticCast(Sema &Self, Expr *&SrcExpr, // In the CStyle case, the earlier attempt to const_cast should have taken // care of reverse qualification conversions. - QualType OrigSrcType = SrcExpr->getType(); - QualType SrcType = Self.Context.getCanonicalType(SrcExpr->getType()); // C++0x 5.2.9p9: A value of a scoped enumeration type can be explicitly diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index e7bd7d5e87..c736d47d43 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -4995,10 +4995,7 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, // Form the assignment: // static_cast<Base*>(this)->Base::operator=(static_cast<Base&>(other)); QualType BaseType = Base->getType().getUnqualifiedType(); - CXXRecordDecl *BaseClassDecl = 0; - if (const RecordType *BaseRecordT = BaseType->getAs<RecordType>()) - BaseClassDecl = cast<CXXRecordDecl>(BaseRecordT->getDecl()); - else { + if (!BaseType->isRecordType()) { Invalid = true; continue; } @@ -6220,8 +6217,6 @@ Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) { Invalid = true; } - QualType ExDeclType = TInfo->getType(); - IdentifierInfo *II = D.getIdentifier(); if (NamedDecl *PrevDecl = LookupSingleName(S, II, D.getIdentifierLoc(), LookupOrdinaryName, diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 902afac0a7..26fdb2e059 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -8531,7 +8531,7 @@ ExprResult Sema::ActOnVAArg(SourceLocation BuiltinLoc, Expr *expr, ParsedType type, SourceLocation RPLoc) { TypeSourceInfo *TInfo; - QualType T = GetTypeFromParser(type, &TInfo); + GetTypeFromParser(type, &TInfo); return BuildVAArgExpr(BuiltinLoc, expr, TInfo, RPLoc); } diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index d08d26ffb6..61fe55b4a7 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -718,7 +718,6 @@ Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, if (!TInfo) TInfo = Context.getTrivialTypeSourceInfo(AllocType); - SourceRange R = TInfo->getTypeLoc().getSourceRange(); return BuildCXXNew(StartLoc, UseGlobal, PlacementLParen, move(PlacementArgs), diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 3c9d386f81..d4953c32f6 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -6128,4 +6128,3 @@ Sema::getTemplateArgumentBindingsText(const TemplateParameterList *Params, Out << ']'; return Out.str(); } - diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index a608bea34c..0d074e0333 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -2019,11 +2019,9 @@ Sema::SubstituteExplicitTemplateArguments( // note that the template argument pack is partially substituted and record // the explicit template arguments. They'll be used as part of deduction // for this template parameter pack. - bool HasPartiallySubstitutedPack = false; for (unsigned I = 0, N = Builder.size(); I != N; ++I) { const TemplateArgument &Arg = Builder[I]; if (Arg.getKind() == TemplateArgument::Pack) { - HasPartiallySubstitutedPack = true; CurrentInstantiationScope->SetPartiallySubstitutedPack( TemplateParams->getParam(I), Arg.pack_begin(), @@ -2438,7 +2436,6 @@ static bool AdjustFunctionParmAndArgTypesForDeduction(Sema &S, else { // - If A is a cv-qualified type, the top level cv-qualifiers of A’s // type are ignored for type deduction. - QualType CanonArgType = S.Context.getCanonicalType(ArgType); if (ArgType.getCVRQualifiers()) ArgType = ArgType.getUnqualifiedType(); } diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index be4d82c39a..2020260d4f 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -7126,7 +7126,6 @@ TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) { ParmVarDecl *OldParm = (*P); ParmVarDecl *NewParm = getDerived().TransformFunctionTypeParam(OldParm, llvm::Optional<unsigned>()); - QualType NewType = NewParm->getType(); Params.push_back(NewParm); ParamTypes.push_back(NewParm->getType()); } |