From: Douglas Gregor Date: Wed, 5 Jul 2017 21:12:37 +0000 (+0000) Subject: Fix test case in pre-C++11 mode; address Aaron Ballman's code review. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f0208412a2f7d8f99f426c821d528c4bf682a38;p=clang Fix test case in pre-C++11 mode; address Aaron Ballman's code review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307202 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 1485b80cf9..c1205d7f03 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -2843,7 +2843,7 @@ static Expr *lookThroughRangesV3Condition(Preprocessor &PP, Expr *Cond) { // With an inner '==' that has a literal on the right-hand side. Expr *LHS = BinOp->getLHS(); - auto InnerBinOp = dyn_cast(LHS->IgnoreParenImpCasts()); + auto *InnerBinOp = dyn_cast(LHS->IgnoreParenImpCasts()); if (!InnerBinOp) return Cond; if (InnerBinOp->getOpcode() != BO_EQ || @@ -2853,7 +2853,7 @@ static Expr *lookThroughRangesV3Condition(Preprocessor &PP, Expr *Cond) { // If the inner binary operation came from a macro expansion named // CONCEPT_REQUIRES or CONCEPT_REQUIRES_, return the right-hand side // of the '||', which is the real, user-provided condition. - auto Loc = InnerBinOp->getExprLoc(); + SourceLocation Loc = InnerBinOp->getExprLoc(); if (!Loc.isMacroID()) return Cond; StringRef MacroName = PP.getImmediateMacroName(Loc); diff --git a/test/SemaTemplate/overload-candidates.cpp b/test/SemaTemplate/overload-candidates.cpp index 8e0ddb0a5e..de998d74f9 100644 --- a/test/SemaTemplate/overload-candidates.cpp +++ b/test/SemaTemplate/overload-candidates.cpp @@ -157,7 +157,7 @@ namespace PR15673 { #if __cplusplus <= 199711L // expected-warning@+4 {{default template arguments for a function template are a C++11 extension}} - // expected-warning@+4 {{default template arguments for a function template are a C++11 extension}} + // expected-warning@+3 {{default template arguments for a function template are a C++11 extension}} #endif template::value && some_trait::value)>