[PATCH] D33393: [PATCH] Libcxxabi Demangler PR32890

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 11:44:14 PDT 2017


erik.pilkington added a comment.

> but having a constant like this ("7") sounds wrong. Why not 6, or 8, or 42?

7 is correct here because we inserting into a specific point into a string that was inserted into db.names just above this (but out of context from the diff). The only problem is that more stuff was inserted in the meantime.
This is horrible, but the demangler is littered with random offsets. My personal favorite is that const, volatile, and restrict aren't represented with an enum, but just with the literals 1, 2, and 4.


https://reviews.llvm.org/D33393





More information about the cfe-commits mailing list