aaron.ballman added a subscriber: aaron.ballman.

================
Comment at: cppcoreguidelines/ProTypeMemberInitCheck.cpp:183
@@ +182,3 @@
+  // Skip delayed template instantiation declarations.
+  const auto *Body = Ctor->getBody();
+  if (!Body)
----------------
Please do not use auto here since the type isn't spelled out in the 
initializer. (The line directly above it also should not be using auto either.)

================
Comment at: modernize/RedundantVoidArgCheck.cpp:108
@@ -107,3 +107,3 @@
     SourceLocation End;
-    if (Function->hasBody())
-      End = Function->getBody()->getLocStart().getLocWithOffset(-1);
+    const auto *Body = Function->getBody();
+    if (Body)
----------------
Don't use auto here either.

================
Comment at: modernize/RedundantVoidArgCheck.cpp:109
@@ +108,3 @@
+    const auto *Body = Function->getBody();
+    if (Body)
+      End = Body->getLocStart().getLocWithOffset(-1);
----------------
You could get rid of the if and else and just use it directly in 
removeVoidArgumentTokens().
```
removeVoidArgumentTokens(Result, SourceRange(Start, Body ? 
Body->getLocStart().getLocWithOffset(-1) : Function-getLocEnd()), "function 
definition");
```


http://reviews.llvm.org/D18238



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to