This is an archive of the discontinued LLVM Phabricator instance.

[MS Demangler] Fix several issues related to templates
ClosedPublic

Authored by zturner on Aug 9 2018, 7:30 AM.

Details

Summary

These were uncovered when porting the mangling tests in ms-templates.cpp from clang/CodeGenCXX over to demangling tests. The main issues fixed here are surrounding integer literal signed and unsignedness, empty array dimensions, and pointer and reference non-type template parameters.

I'm on Linux right now so I can't run these through undname to check what it returns in these cases, but I'm satisfied with our output regardless and it matches up with the original source code.

I'd like to eventually do something "prettier" for the uuid cases, but for now at least it's not wrong.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Aug 9 2018, 7:30 AM
rnk accepted this revision.Aug 9 2018, 6:19 PM

lgtm

llvm/lib/Demangle/MicrosoftDemangle.cpp
1371 ↗(On Diff #159924)

This assert is implied by startsWithLocalScopePattern and can't be tripped by corrupt input, right?

This revision is now accepted and ready to land.Aug 9 2018, 6:19 PM
This revision was automatically updated to reflect the committed changes.