[PATCH] D38643: PR13575: Fix USR mangling for fixed-size arrays.

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 6 16:21:41 PDT 2017


arphaman added a comment.

Thanks, it looks much better! A couple more comments:



================
Comment at: lib/Index/USRGeneration.cpp:819
     }
+    if (const ArrayType *const AT = dyn_cast<ArrayType>(T)) {
+      Out << "{";
----------------
You can use `const auto *` here.


================
Comment at: lib/Index/USRGeneration.cpp:826
+      }
+      if (const ConstantArrayType* const CAT = dyn_cast<ConstantArrayType>(T)) {
+        Out << CAT->getSize();
----------------
Ditto. Also, the braces are redundant.


================
Comment at: lib/Index/USRGeneration.cpp:829
+      }
+      Out << "}";
+      T = AT->getElementType();
----------------
I don't think we need the terminating character.


https://reviews.llvm.org/D38643





More information about the cfe-commits mailing list