erik.pilkington created this revision. erik.pilkington added reviewers: erichkeane, aaron.ballman. Herald added subscribers: ributzka, dexonsmith, jkorous.
Looks like this was just a copy & paste mistake from `getDependentSizedExtVectorType`. rdar://60092165 Repository: rC Clang https://reviews.llvm.org/D79012 Files: clang/lib/AST/ASTContext.cpp clang/test/SemaCXX/vector.cpp Index: clang/test/SemaCXX/vector.cpp =================================================================== --- clang/test/SemaCXX/vector.cpp +++ clang/test/SemaCXX/vector.cpp @@ -475,3 +475,12 @@ #endif // __cplusplus >= 201103L } } + +namespace rdar60092165 { +template <class T> void f() { + typedef T first_type __attribute__((vector_size(sizeof(T) * 4))); + typedef T second_type __attribute__((vector_size(sizeof(T) * 4))); + + second_type st; +} +} Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -3694,10 +3694,10 @@ (void)CanonCheck; DependentVectorTypes.InsertNode(New, InsertPos); } else { - QualType CanonExtTy = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, - SourceLocation()); + QualType CanonTy = getDependentVectorType(CanonVecTy, SizeExpr, + SourceLocation(), VecKind); New = new (*this, TypeAlignment) DependentVectorType( - *this, VecType, CanonExtTy, SizeExpr, AttrLoc, VecKind); + *this, VecType, CanonTy, SizeExpr, AttrLoc, VecKind); } }
Index: clang/test/SemaCXX/vector.cpp =================================================================== --- clang/test/SemaCXX/vector.cpp +++ clang/test/SemaCXX/vector.cpp @@ -475,3 +475,12 @@ #endif // __cplusplus >= 201103L } } + +namespace rdar60092165 { +template <class T> void f() { + typedef T first_type __attribute__((vector_size(sizeof(T) * 4))); + typedef T second_type __attribute__((vector_size(sizeof(T) * 4))); + + second_type st; +} +} Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -3694,10 +3694,10 @@ (void)CanonCheck; DependentVectorTypes.InsertNode(New, InsertPos); } else { - QualType CanonExtTy = getDependentSizedExtVectorType(CanonVecTy, SizeExpr, - SourceLocation()); + QualType CanonTy = getDependentVectorType(CanonVecTy, SizeExpr, + SourceLocation(), VecKind); New = new (*this, TypeAlignment) DependentVectorType( - *this, VecType, CanonExtTy, SizeExpr, AttrLoc, VecKind); + *this, VecType, CanonTy, SizeExpr, AttrLoc, VecKind); } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits