[Sema] Range-ify for loop, add period to comment. NFC.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 10 Nov 2016 21:47:12 +0000 (21:47 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 10 Nov 2016 21:47:12 +0000 (21:47 +0000)
llvm-svn: 286506

clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaOverload.cpp

index 1be69c5..ffb1051 100644 (file)
@@ -825,8 +825,8 @@ static void handleEnableIfAttr(Sema &S, Decl *D, const AttributeList &Attr) {
       !Expr::isPotentialConstantExprUnevaluated(Cond, cast<FunctionDecl>(D),
                                                 Diags)) {
     S.Diag(Attr.getLoc(), diag::err_enable_if_never_constant_expr);
-    for (int I = 0, N = Diags.size(); I != N; ++I)
-      S.Diag(Diags[I].first, Diags[I].second);
+    for (const PartialDiagnosticAt &PDiag : Diags)
+      S.Diag(PDiag.first, PDiag.second);
     return;
   }
 
index cdfb30b..2e56786 100644 (file)
@@ -12498,7 +12498,7 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
 
   // In the case the method to call was not selected by the overloading
   // resolution process, we still need to handle the enable_if attribute. Do
-  // that here, so it will not hide previous -- and more relevant -- errors
+  // that here, so it will not hide previous -- and more relevant -- errors.
   if (isa<MemberExpr>(NakedMemExpr)) {
     if (const EnableIfAttr *Attr = CheckEnableIf(Method, Args, true)) {
       Diag(MemExprE->getLocStart(),