]> granicus.if.org Git - clang/commitdiff
Fix test case in pre-C++11 mode; address Aaron Ballman's code review.
authorDouglas Gregor <dgregor@apple.com>
Wed, 5 Jul 2017 21:12:37 +0000 (21:12 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 5 Jul 2017 21:12:37 +0000 (21:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307202 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp
test/SemaTemplate/overload-candidates.cpp

index 1485b80cf9576ef0d925075cb3100d3792e1704f..c1205d7f03a1e5a53cb2845faab86ed73d9e6ba5 100644 (file)
@@ -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<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 *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);
index 8e0ddb0a5e4ccd1c70e732103ed28c4160ae2f0f..de998d74f9af606a315b363cdac149e7bbe20d5b 100644 (file)
@@ -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<typename T,
            CONCEPT_REQUIRES_(some_passing_trait<T>::value && some_trait<T>::value)>