]> granicus.if.org Git - clang/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286506 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 1be69c5276a682ddddf8da7b22f5b528ce568600..ffb1051bb48b09d1bd3ec1f71a89ac5502f56213 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 cdfb30b30a35f26f4a6ac96e414fb67071e4e38c..2e567863261c9b9f1a256c88d65e43140081303e 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(),