Index: clang/lib/Sema/SemaType.cpp =================================================================== --- clang/lib/Sema/SemaType.cpp +++ clang/lib/Sema/SemaType.cpp @@ -5978,9 +5978,9 @@ } ASTContext &Ctx = S.Context; - auto *ASAttr = ::new (Ctx) AddressSpaceAttr( - Attr.getRange(), Ctx, Attr.getAttributeSpellingListIndex(), - static_cast(ASIdx)); + auto *ASAttr = ::new (Ctx) + AddressSpaceAttr(Attr.getRange(), Ctx, static_cast(ASIdx), + Attr.getAttributeSpellingListIndex()); // If the expression is not value dependent (not templated), then we can // apply the address space qualifiers just to the equivalent type.