[libcxxabi] r327228 - [demangler] Simplify printing of structured bindings.

Erik Pilkington via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 10 14:33:50 PST 2018


Author: epilk
Date: Sat Mar 10 14:33:49 2018
New Revision: 327228

URL: http://llvm.org/viewvc/llvm-project?rev=327228&view=rev
Log:
[demangler] Simplify printing of structured bindings.

Thanks to Richard Smith for the post-commit review!

Modified:
    libcxxabi/trunk/src/cxa_demangle.cpp
    libcxxabi/trunk/test/test_demangle.pass.cpp

Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=327228&r1=327227&r2=327228&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Sat Mar 10 14:33:49 2018
@@ -1345,7 +1345,7 @@ public:
       : Node(KStructuredBindingName), Bindings(Bindings_) {}
 
   void printLeft(OutputStream &S) const override {
-    S += "'structured-binding'[";
+    S += '[';
     Bindings.printWithComma(S);
     S += ']';
   }

Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=327228&r1=327227&r2=327228&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Sat Mar 10 14:33:49 2018
@@ -29720,10 +29720,10 @@ const char* cases[][2] =
     {"___Z10blocksNRVOv_block_invoke", "invocation function for block in blocksNRVO()"},
 
     // Structured bindings:
-    {"_ZDC2a12a2E", "'structured-binding'[a1, a2]"},
-    {"_ZN2NSDC1x1yEE", "NS::'structured-binding'[x, y]"},
+    {"_ZDC2a12a2E", "[a1, a2]"},
+    {"_ZN2NSDC1x1yEE", "NS::[x, y]"},
 
-    {"_ZGRDC1x1yE_", "reference temporary for 'structured-binding'[x, y]"},
+    {"_ZGRDC1x1yE_", "reference temporary for [x, y]"},
     {"_ZGR1bIvE2_", "reference temporary for b<void>"},
 };
 




More information about the cfe-commits mailing list