llvm.org GIT mirror llvm / 60b4e66
Demangle: avoid butchering parameter type When demangling a CV-qualified function type with a final parameter with a reference type, we would insert the CV qualification on the parameter rather than the function, and in the process adjust the insertion point by one extra, splitting the type name. This avoids doing so, even though the attribution is still incorrect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292965 91177308-0d34-0410-b5e6-96231b3b80d8 Saleem Abdulrasool 2 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
16641664 if (is_function) {
16651665 size_t p = db.names[k].second.size();
16661666 if (db.names[k].second[p - 2] == '&')
1667 p -= 3;
1667 p -= 2;
16681668 else if (db.names[k].second.back() == '&')
1669 p -= 2;
1669 p -= 1;
16701670 if (cv & 1) {
16711671 db.names[k].second.insert(p, " const");
16721672 p += 6;