[llvm] r303738 - Demangler: Fix constructor cv qualifier handling

Tamas Berghammer via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 04:29:02 PDT 2017


Author: tberghammer
Date: Wed May 24 06:29:02 2017
New Revision: 303738

URL: http://llvm.org/viewvc/llvm-project?rev=303738&view=rev
Log:
Demangler: Fix constructor cv qualifier handling

Previously if we parsed a constructor then we set parsed_ctor_dtor_cv
to true and never reseted it. This causes issue when a template argument
references a constructor (e.g. type of lambda defined inside a
constructor) as we will have the parsed_ctor_dtor_cv flag set what will
cause issues when parsing later arguments.

Differential Revision: https://reviews.llvm.org/D33385
libcxxabi change: https://reviews.llvm.org/rL303737

Modified:
    llvm/trunk/lib/Demangle/ItaniumDemangle.cpp

Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/ItaniumDemangle.cpp?rev=303738&r1=303737&r2=303738&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Wed May 24 06:29:02 2017
@@ -4030,6 +4030,8 @@ static const char *parse_encoding(const
     save_value<decltype(db.tag_templates)> sb(db.tag_templates);
     if (db.encoding_depth > 1)
       db.tag_templates = true;
+    save_value<decltype(db.parsed_ctor_dtor_cv)> sp(db.parsed_ctor_dtor_cv);
+    db.parsed_ctor_dtor_cv = false;
     switch (*first) {
     case 'G':
     case 'T':




More information about the llvm-commits mailing list