forked from OSchip/llvm-project
[AST] Fix a crash on a dependent vector_size attribute
Looks like this was just a copy & paste mistake from getDependentSizedExtVectorType. rdar://60092165 Differential revision: https://reviews.llvm.org/D79012
This commit is contained in:
parent
d9786b566b
commit
2bb686b4b6
|
@ -3694,10 +3694,10 @@ ASTContext::getDependentVectorType(QualType VecType, Expr *SizeExpr,
|
|||
(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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -475,3 +475,12 @@ void use() {
|
|||
#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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue