r181092 - Simplify slightly.

Richard Smith richard-llvm at metafoo.co.uk
Fri May 3 18:51:08 PDT 2013


Author: rsmith
Date: Fri May  3 20:51:08 2013
New Revision: 181092

URL: http://llvm.org/viewvc/llvm-project?rev=181092&view=rev
Log:
Simplify slightly.

Modified:
    cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=181092&r1=181091&r2=181092&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Fri May  3 20:51:08 2013
@@ -4101,7 +4101,7 @@ static bool isSameTemplate(TemplateDecl
 /// template argument deduction.
 UnresolvedSetIterator
 Sema::getMostSpecialized(UnresolvedSetIterator SpecBegin,
-                        UnresolvedSetIterator SpecEnd,
+                         UnresolvedSetIterator SpecEnd,
                          TemplatePartialOrderingContext TPOC,
                          unsigned NumCallArguments,
                          SourceLocation Loc,
@@ -4158,11 +4158,10 @@ Sema::getMostSpecialized(UnresolvedSetIt
   }
 
   // Diagnose the ambiguity.
-  if (Complain)
+  if (Complain) {
     Diag(Loc, AmbigDiag);
 
-  if (Complain)
-  // FIXME: Can we order the candidates in some sane way?
+    // FIXME: Can we order the candidates in some sane way?
     for (UnresolvedSetIterator I = SpecBegin; I != SpecEnd; ++I) {
       PartialDiagnostic PD = CandidateDiag;
       PD << getTemplateArgumentBindingsText(
@@ -4173,6 +4172,7 @@ Sema::getMostSpecialized(UnresolvedSetIt
                                    TargetType);
       Diag((*I)->getLocation(), PD);
     }
+  }
 
   return SpecEnd;
 }





More information about the cfe-commits mailing list