diff options
Diffstat (limited to 'llvm/lib/Demangle')
-rw-r--r-- | llvm/lib/Demangle/MicrosoftDemangle.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp index c3bdfa23d1f..49cfcde9c58 100644 --- a/llvm/lib/Demangle/MicrosoftDemangle.cpp +++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp @@ -949,9 +949,10 @@ Demangler::demangleTemplateInstantiationName(StringView &MangledName, if (NBB & NBB_Template) { // NBB_Template is only set for types and non-leaf names ("a::" in "a::b"). - // A conversion operator only makes sense in a leaf name , so reject it in - // NBB_Template contexts. - if (Identifier->kind() == NodeKind::ConversionOperatorIdentifier) { + // Structors and conversion operators only makes sense in a leaf name, so + // reject them in NBB_Template contexts. + if (Identifier->kind() == NodeKind::ConversionOperatorIdentifier || + Identifier->kind() == NodeKind::StructorIdentifier) { Error = true; return nullptr; } |