[libcxx-commits] [PATCH] D140359: [ItaniumDemangle] Fix substitution failure of _BitInt

Senran Zhang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 19 21:47:30 PST 2022


zsrkmyn updated this revision to Diff 484164.
zsrkmyn added reviewers: libc++abi, aaron.ballman, urnathan, erichkeane, ldionne.
zsrkmyn set the repository for this revision to rG LLVM Github Monorepo.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++abi.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140359

Files:
  libcxxabi/src/demangle/ItaniumDemangle.h
  libcxxabi/test/test_demangle.pass.cpp
  llvm/include/llvm/Demangle/ItaniumDemangle.h


Index: libcxxabi/test/test_demangle.pass.cpp
===================================================================
--- libcxxabi/test/test_demangle.pass.cpp
+++ libcxxabi/test/test_demangle.pass.cpp
@@ -33,6 +33,7 @@
     {"_Z1Av", "A()"},
     {"_Z1A1B1C", "A(B, C)"},
     {"_Z1fDB3_", "f(_BitInt(3))"},
+    {"_Z1fDB3_S_", "f(_BitInt(3), _BitInt(3))"},
     {"_Z1fDU10_", "f(unsigned _BitInt(10))"},
     {"_Z1fIfEvDUstPT__", "void f<float>(unsigned _BitInt(sizeof (float*)))"},
     {"_Z1fIiEvDBstPT__", "void f<int>(_BitInt(sizeof (int*)))"},
Index: libcxxabi/src/demangle/ItaniumDemangle.h
===================================================================
--- libcxxabi/src/demangle/ItaniumDemangle.h
+++ libcxxabi/src/demangle/ItaniumDemangle.h
@@ -3926,7 +3926,8 @@
         return nullptr;
       if (!consumeIf('_'))
         return nullptr;
-      return make<BitIntType>(Size, Signed);
+      Result = make<BitIntType>(Size, Signed);
+      break;
     }
     //                ::= Di   # char32_t
     case 'i':
Index: llvm/include/llvm/Demangle/ItaniumDemangle.h
===================================================================
--- llvm/include/llvm/Demangle/ItaniumDemangle.h
+++ llvm/include/llvm/Demangle/ItaniumDemangle.h
@@ -3926,7 +3926,8 @@
         return nullptr;
       if (!consumeIf('_'))
         return nullptr;
-      return make<BitIntType>(Size, Signed);
+      Result = make<BitIntType>(Size, Signed);
+      break;
     }
     //                ::= Di   # char32_t
     case 'i':


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140359.484164.patch
Type: text/x-patch
Size: 1516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221220/4cf29cae/attachment-0001.bin>


More information about the libcxx-commits mailing list