andreybokhanko marked 3 inline comments as done. andreybokhanko added a comment.
David, thank you for the review! In http://reviews.llvm.org/D19654#416408, @majnemer wrote: > It would be good to have a test for the variable template case: > > template <typename T> > T x; > > auto g() { return x<int __unaligned *>; } > > > should mangle to `??$x@PEFAH@@3PEFAHEFA` It mangles exaclty to `??$x@PEFAH@@3PEFAHEFA` (in 64 bit mode). Test added. ================ Comment at: lib/AST/MicrosoftMangle.cpp:1446-1451 @@ -1445,5 +1445,8 @@ Out << 'E'; if (HasRestrict) Out << 'I'; + + if (!PointeeType.isNull() && PointeeType.getLocalQualifiers().hasUnaligned()) + Out << 'F'; } ---------------- Good catch! Indeed, __restrict and __unaligned are mangled in a different order. Fixed; test added. ================ Comment at: lib/AST/MicrosoftMangle.cpp:1583-1585 @@ -1579,3 +1582,5 @@ case QMM_Result: + // Presence of __unaligned qualifier shouldn't affect mangling here. + Quals.removeUnaligned(); if ((!IsPointer && Quals) || isa<TagType>(T)) { Out << '?'; ---------------- Done. Test added. http://reviews.llvm.org/D19654 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits