[clang] [Clang] remove qualifiers in getCanonicalTypeUnqualified (PR #170271)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 12:09:16 PST 2025
rjmccall wrote:
IIRC, the original point of this function was to expose a way to get the canonical type extremely cheaply for operations that are just going to ignore local qualifiers anyway. The problem is not that that operation exists — it's good to use a cheaper operation when you can — it's that it's misnamed in a way that's encouraging misuse. We should probably break it into `getUnqualifiedCanonicalType`, which does the change you're proposing here, and `getCanonicalTypeWithoutLocalQualifiers()`, which hopefully has a sufficiently discouraging name that people won't accidentally use it.
https://github.com/llvm/llvm-project/pull/170271
More information about the cfe-commits
mailing list