diff options
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | test/Sema/ext_vector_casts.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index a8ead6d46b..af4b7eb3a6 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -585,8 +585,6 @@ bool Type::isRealType() const { 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; } diff --git a/test/Sema/ext_vector_casts.c b/test/Sema/ext_vector_casts.c index be09903e00..7b7b0caf0a 100644 --- a/test/Sema/ext_vector_casts.c +++ b/test/Sema/ext_vector_casts.c @@ -45,3 +45,7 @@ static void test() { } 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'}} +} |