summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-05-13 04:00:12 +0000
committerChris Lattner <sabre@nondot.org>2009-05-13 04:00:12 +0000
commit851eb927d7e44b4f75d1f13a065ced7c19604ed3 (patch)
treea201e6ecafb605da1017689f28315a1a9d8d4927 /clang/lib
parente712a2f66380e9a837726cc442094b0ac1ed5d06 (diff)
downloadbcm5719-llvm-851eb927d7e44b4f75d1f13a065ced7c19604ed3.tar.gz
bcm5719-llvm-851eb927d7e44b4f75d1f13a065ced7c19604ed3.zip
Fix rdar://6881069, a crash on a form of vector_size that we
don't support. While it would be nice to support this eventually, this form is not common at all (just seen in gcc testsuite) and it might be better to model vector_size as a type attribute anyway. For now just emit a nice error on it. llvm-svn: 71633
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 919f28ffec7..6e2cc699a71 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -207,7 +207,8 @@ static void HandleVectorSizeAttr(Decl *D, const AttributeList &Attr, Sema &S) {
// vector arrays, and functions returning vectors.
if (CurType->isPointerType() || CurType->isArrayType() ||
CurType->isFunctionType()) {
- assert(0 && "HandleVector(): Complex type construction unimplemented");
+ S.Diag(Attr.getLoc(), diag::err_unsupported_vector_size) << CurType;
+ return;
/* FIXME: rebuild the type from the inside out, vectorizing the inner type.
do {
if (PointerType *PT = dyn_cast<PointerType>(canonType))
OpenPOWER on IntegriCloud