[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)
Qizhi Hu via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 18 19:07:18 PST 2024
================
@@ -7081,10 +7085,10 @@ QualType TreeTransform<Derived>::TransformAttributedType(
// FIXME: dependent operand expressions?
if (getDerived().AlwaysRebuild() ||
modifiedType != oldType->getModifiedType()) {
- // TODO: this is really lame; we should really be rebuilding the
- // equivalent type from first principles.
- QualType equivalentType
- = getDerived().TransformType(oldType->getEquivalentType());
+ TypeLocBuilder AuxiliaryTLB;
+ AuxiliaryTLB.reserve(TL.getFullDataSize());
----------------
jcsxky wrote:
@cor3ntin @AaronBallman @erichkeane The test on windows platform failed with `TLB.TypeWasModifiedSafely(result);`. Maybe we shouldn't change `LastTy` of `TLB` since we just transform `EquivalentType` using `AuxiliaryTLB` and haven't touched `TLB`.
https://github.com/llvm/llvm-project/pull/78088
More information about the cfe-commits
mailing list