forked from OSchip/llvm-project
Simplifying a test for duplicate vec_type_hint attributes. The assert and attribute kind test were superfluous. No functional change intended.
llvm-svn: 196162
This commit is contained in:
parent
564560f911
commit
a9e0540c78
|
@ -2319,8 +2319,6 @@ static void handleWorkGroupSize(Sema &S, Decl *D,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleVecTypeHint(Sema &S, Decl *D, const AttributeList &Attr) {
|
static void handleVecTypeHint(Sema &S, Decl *D, const AttributeList &Attr) {
|
||||||
assert(Attr.getKind() == AttributeList::AT_VecTypeHint);
|
|
||||||
|
|
||||||
if (!Attr.hasParsedType()) {
|
if (!Attr.hasParsedType()) {
|
||||||
S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments)
|
S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments)
|
||||||
<< Attr.getName() << 1;
|
<< Attr.getName() << 1;
|
||||||
|
@ -2339,9 +2337,7 @@ static void handleVecTypeHint(Sema &S, Decl *D, const AttributeList &Attr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Attr.getKind() == AttributeList::AT_VecTypeHint &&
|
if (VecTypeHintAttr *A = D->getAttr<VecTypeHintAttr>()) {
|
||||||
D->hasAttr<VecTypeHintAttr>()) {
|
|
||||||
VecTypeHintAttr *A = D->getAttr<VecTypeHintAttr>();
|
|
||||||
if (!S.Context.hasSameType(A->getTypeHint(), ParmType)) {
|
if (!S.Context.hasSameType(A->getTypeHint(), ParmType)) {
|
||||||
S.Diag(Attr.getLoc(), diag::warn_duplicate_attribute) << Attr.getName();
|
S.Diag(Attr.getLoc(), diag::warn_duplicate_attribute) << Attr.getName();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue