r307202 - Fix test case in pre-C++11 mode; address Aaron Ballman's code review.

Douglas Gregor via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 14:12:37 PDT 2017


Author: dgregor
Date: Wed Jul  5 14:12:37 2017
New Revision: 307202

URL: http://llvm.org/viewvc/llvm-project?rev=307202&view=rev
Log:
Fix test case in pre-C++11 mode; address Aaron Ballman's code review.

Modified:
    cfe/trunk/lib/Sema/SemaTemplate.cpp
    cfe/trunk/test/SemaTemplate/overload-candidates.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=307202&r1=307201&r2=307202&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Wed Jul  5 14:12:37 2017
@@ -2843,7 +2843,7 @@ static Expr *lookThroughRangesV3Conditio
 
   // With an inner '==' that has a literal on the right-hand side.
   Expr *LHS = BinOp->getLHS();
-  auto InnerBinOp = dyn_cast<BinaryOperator>(LHS->IgnoreParenImpCasts());
+  auto *InnerBinOp = dyn_cast<BinaryOperator>(LHS->IgnoreParenImpCasts());
   if (!InnerBinOp) return Cond;
 
   if (InnerBinOp->getOpcode() != BO_EQ ||
@@ -2853,7 +2853,7 @@ static Expr *lookThroughRangesV3Conditio
   // 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);

Modified: cfe/trunk/test/SemaTemplate/overload-candidates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/overload-candidates.cpp?rev=307202&r1=307201&r2=307202&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/overload-candidates.cpp (original)
+++ cfe/trunk/test/SemaTemplate/overload-candidates.cpp Wed Jul  5 14:12:37 2017
@@ -157,7 +157,7 @@ namespace PR15673 {
 
 #if __cplusplus <= 199711L
   // expected-warning at +4 {{default template arguments for a function template are a C++11 extension}}
-  // expected-warning at +4 {{default template arguments for a function template are a C++11 extension}}
+  // expected-warning at +3 {{default template arguments for a function template are a C++11 extension}}
 #endif
   template<typename T,
            CONCEPT_REQUIRES_(some_passing_trait<T>::value && some_trait<T>::value)>




More information about the cfe-commits mailing list