diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-11-20 01:35:23 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-11-20 01:35:23 +0000 |
commit | dbb634f882a5be0051b3eaf16d8395493c227848 (patch) | |
tree | 6698e77e8a4c058b7aac7fbd66d06e999b18fd08 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 1a1d30d43b3c63412dd22e311112bd3798c179d4 (diff) | |
download | bcm5719-llvm-dbb634f882a5be0051b3eaf16d8395493c227848.tar.gz bcm5719-llvm-dbb634f882a5be0051b3eaf16d8395493c227848.zip |
Removing a custom error diagnostic and replacing it with a stock one. Added a test case to ensure the diagnostic was firing properly.
llvm-svn: 195188
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 4d0c6771e98..6f884435d93 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -57,7 +57,8 @@ enum AttributeDeclKind { ExpectedObjectiveCInterface, ExpectedMethodOrProperty, ExpectedStructOrUnion, - ExpectedStructOrUnionOrClass + ExpectedStructOrUnionOrClass, + ExpectedType }; //===----------------------------------------------------------------------===// @@ -1249,7 +1250,8 @@ static void handleExtVectorTypeAttr(Sema &S, Scope *scope, Decl *D, if (TD == 0) { // __attribute__((ext_vector_type(N))) can only be applied to typedefs // and type-ids. - S.Diag(Attr.getLoc(), diag::err_typecheck_ext_vector_not_typedef); + S.Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type) << + Attr.getName() << ExpectedType; return; } |