Index: lib/Sema/SemaDeclCXX.cpp =================================================================== --- lib/Sema/SemaDeclCXX.cpp +++ lib/Sema/SemaDeclCXX.cpp @@ -12470,6 +12470,7 @@ Diag(TemplateParams->getTemplateLoc(), diag::err_template_tag_noparams) << TypeWithKeyword::getTagTypeKindName(Kind) << Name; isExplicitSpecialization = true; + (void) isExplicitSpecialization; } } Index: lib/Sema/SemaExpr.cpp =================================================================== --- lib/Sema/SemaExpr.cpp +++ lib/Sema/SemaExpr.cpp @@ -9692,16 +9692,16 @@ // Track if the current expression is the result of a derefence, and if the // next checked expression is the result of a derefence. + // These variables are only updated when processing MemberExpr + // chains in the loop below. bool IsDereference = false; bool NextIsDereference = false; // Loop to process MemberExpr chains. while (true) { - IsDereference = NextIsDereference; - NextIsDereference = false; - E = E->IgnoreParenImpCasts(); if (const MemberExpr *ME = dyn_cast(E)) { + IsDereference = NextIsDereference; NextIsDereference = ME->isArrow(); const ValueDecl *VD = ME->getMemberDecl(); if (const FieldDecl *Field = dyn_cast(VD)) { Index: lib/Sema/SemaTemplate.cpp =================================================================== --- lib/Sema/SemaTemplate.cpp +++ lib/Sema/SemaTemplate.cpp @@ -6248,8 +6248,6 @@ SourceRange(TemplateParams->getTemplateLoc(), TemplateParams->getRAngleLoc())) << SourceRange(LAngleLoc, RAngleLoc); - else - isExplicitSpecialization = true; } else { assert(TUK == TUK_Friend && "should have a 'template<>' for this decl"); }