of the callers of isRealType() already assumed this, and one of them
(increment/decrement) mistakenly permitted increments of vector types
because of it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106596
91177308-0d34-0410-b5e6-
96231b3b80d8
BT->getKind() <= BuiltinType::LongDouble;
if (const TagType *TT = dyn_cast<TagType>(CanonicalType))
return TT->getDecl()->isEnum() && TT->getDecl()->isDefinition();
- if (const VectorType *VT = dyn_cast<VectorType>(CanonicalType))
- return VT->getElementType()->isRealType();
return false;
}
}
typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector type 'float2'}}
+
+void inc(float2 f2) {
+ f2++; // expected-error{{cannot increment value of type 'float2'}}
+}