[PATCH] D11035: trivial patch, improve constness

Meador Inge meadori at gmail.com
Wed Jul 8 12:58:18 PDT 2015


meadori added a subscriber: meadori.
meadori added a comment.

Overall this looks reasonable to me and consistent with the style for the rest of this file (which uses `const` when possible also).  One minor comment inline.


================
Comment at: lib/Sema/SemaChecking.cpp:6048
@@ -6047,3 +6047,3 @@
   // being of the new, wider type.
-  if (ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E)) {
+  if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(E)) {
     if (CE->getCastKind() == CK_NoOp || CE->getCastKind() == CK_LValueToRValue)
----------------
Seems like all these casts would be better of with `const auto`?


http://reviews.llvm.org/D11035







More information about the cfe-commits mailing list