[PATCH] Support base vector types of __attribute__((mode))
Alexey Frolov
alexfrolov1878 at yandex.ru
Wed May 27 09:51:07 PDT 2015
> Aaron Ballman wrote:
> "I am unfamiliar with __attribute__((mode)); is there documentation that supports this assertion, or popular code in the wild that is relying on it? GCC's docs are very spartan on the >topic, and there was an (unanswered) question in the PR regarding why we would want to support this."
__attribute__((mode)) is a GCC extension. It is already supported in Clang, but only partially as the current implementation does not cover cases with base vector types.
I tend to claim this issue (described in PR17453) a missing feature/incomplete implementation as GCC compiler does support base vector types.
The community already accepted similar patches for this attribute (issues described in PR16752, PR8703 and PR3691, for example). I hope to think this patch is desirable too.
> Aaron Ballman wrote: "The diagnostic you added does not accept any arguments."
>
> + if (ComplexMode) {
> + S.Diag(Attr.getLoc(), diag::err_complex_mode_vector_type) << Name;
>
> Aaron Ballman wrote: "This diagnostic also does not accept any arguments."
>
> + if (NewTy.isNull()) {
> + S.Diag(Attr.getLoc(), diag::err_mode_wrong_type) << Name;
I removed arguments for the two mentioned diagnostics and updated the patch.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10058
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/CodeGen/attr-mode-vector-types.c
test/Sema/attr-mode-vector-types.c
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10058.26611.patch
Type: text/x-patch
Size: 6692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150527/440f2068/attachment.bin>
More information about the cfe-commits
mailing list