[libcxx-commits] [libcxxabi] r362983 - [demangle] Vendor extended types shouldn't be considered substitution candidates

Erik Pilkington via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 10 14:02:39 PDT 2019


Author: epilk
Date: Mon Jun 10 14:02:39 2019
New Revision: 362983

URL: http://llvm.org/viewvc/llvm-project?rev=362983&view=rev
Log:
[demangle] Vendor extended types shouldn't be considered substitution candidates

Modified:
    libcxxabi/trunk/src/demangle/ItaniumDemangle.h
    libcxxabi/trunk/test/test_demangle.pass.cpp

Modified: libcxxabi/trunk/src/demangle/ItaniumDemangle.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/demangle/ItaniumDemangle.h?rev=362983&r1=362982&r2=362983&view=diff
==============================================================================
--- libcxxabi/trunk/src/demangle/ItaniumDemangle.h (original)
+++ libcxxabi/trunk/src/demangle/ItaniumDemangle.h Mon Jun 10 14:02:39 2019
@@ -3576,7 +3576,11 @@ Node *AbstractManglingParser<Derived, Al
     StringView Res = parseBareSourceName();
     if (Res.empty())
       return nullptr;
-    return make<NameType>(Res);
+    // Typically, <builtin-type>s are not considered substitution candidates,
+    // but the exception to that exception is vendor extended types (Itanium C++
+    // ABI 5.9.1).
+    Result = make<NameType>(Res);
+    break;
   }
   case 'D':
     switch (look(1)) {

Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=362983&r1=362982&r2=362983&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Mon Jun 10 14:02:39 2019
@@ -29765,7 +29765,10 @@ const char* cases[][2] =
     {"____Z3foo_block_invoke.25", "invocation function for block in foo"},
     {"__Z1fv", "f()"},
 
-    {"_Z2tfIZUb_E1SEiv", "int tf<'block-literal'::S>()"}
+    {"_Z2tfIZUb_E1SEiv", "int tf<'block-literal'::S>()"},
+
+    // Vendor extension types are substitution candidates.
+    {"_Z1fu3fooS_", "f(foo, foo)"},
 };
 
 const unsigned N = sizeof(cases) / sizeof(cases[0]);




More information about the libcxx-commits mailing list