Index: llvm/lib/Demangle/DLangDemangle.cpp =================================================================== --- llvm/lib/Demangle/DLangDemangle.cpp +++ llvm/lib/Demangle/DLangDemangle.cpp @@ -1736,6 +1736,12 @@ return nullptr; switch (*Mangled) { + // Null value + case 'n': + Mangled++; + Decl->append("null"); + break; + // Integral values case 'N': Mangled++; @@ -1803,6 +1809,14 @@ Mangled = parseStructLiteral(Decl, Mangled, Name); break; + // Function literal symbol + case 'f': + Mangled++; + if (strncmp(Mangled, "_D", 2) != 0 || !isSymbolName(Mangled + 2)) + return nullptr; + Mangled = parseMangle(Decl, Mangled); + break; + default: return nullptr; } Index: llvm/unittests/Demangle/DLangDemangleTest.cpp =================================================================== --- llvm/unittests/Demangle/DLangDemangleTest.cpp +++ llvm/unittests/Demangle/DLangDemangleTest.cpp @@ -318,7 +318,10 @@ {"_D8demangle28__T4testVS8demangle1SS2i1i2Zv", "demangle.test!(demangle.S(1, 2))"}, {"_D8demangle35__T4testVS8demangle1SS2i1a3_616263Zv", - "demangle.test!(demangle.S(1, \"abc\"))"} + "demangle.test!(demangle.S(1, \"abc\"))"}, + {"_D8demangle13__T4testVPinZv", "demangle.test!(null)"}, + {"_D8demangle__T3abcS_DQt10__lambda13FNaNbNiNfZiZQBhFZi", + "demangle.abc!(demangle.__lambda13()).abc()"} }; for (ExpectedVal Val : ExpectedArray) {