[clang] -fsanitize=function: fix MSVC hashing to sugared type (PR #66816)
Alexandre Ganea via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 11:23:59 PDT 2023
================
@@ -3838,13 +3838,13 @@ void MicrosoftMangleContextImpl::mangleSEHFinallyBlock(
Mangler.mangleName(EnclosingDecl);
}
-void MicrosoftMangleContextImpl::mangleTypeName(
+void MicrosoftMangleContextImpl::mangleCanonicalTypeName(
QualType T, raw_ostream &Out, bool NormalizeIntegers = false) {
// This is just a made up unique string for the purposes of tbaa. undname
// does *not* know how to demangle it.
MicrosoftCXXNameMangler Mangler(*this, Out);
Mangler.getStream() << '?';
- Mangler.mangleType(T, SourceRange());
+ Mangler.mangleType(T.getCanonicalType(), SourceRange());
----------------
aganea wrote:
Like @mizvekov suggested, we could only backport this line to `release/17.x` with a comment above, pointing to this patch?
https://github.com/llvm/llvm-project/pull/66816
More information about the cfe-commits
mailing list