[PATCH] D89765: [LibTooling][Clang-cast] A Clang LibTool to convert C-style casts to C++ style casts and more.

Ray Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 23:53:03 PDT 2020


oneraynyday updated this revision to Diff 299274.
oneraynyday added a comment.

Don't use C++17 features as clang currently uses C++14.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89765/new/

https://reviews.llvm.org/D89765

Files:
  clang-tools-extra/clang-cast/Matcher.h


Index: clang-tools-extra/clang-cast/Matcher.h
===================================================================
--- clang-tools-extra/clang-cast/Matcher.h
+++ clang-tools-extra/clang-cast/Matcher.h
@@ -169,7 +169,9 @@
 // TODO: Is this okay to do?
 Matcher::~Matcher() {
   if (PublishSummary) {
-    for (auto const &[CXXCastKind, Freq] : Statistics) {
+    for (const auto &Pair : Statistics) {
+      const auto &CXXCastKind = Pair.first;
+      const auto &Freq = Pair.second;
       if (!Freq)
         continue;
       llvm::errs() << "The type " << cppCastToString(CXXCastKind)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89765.299274.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201020/ccc38880/attachment.bin>


More information about the cfe-commits mailing list