diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-06-29 00:16:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-06-29 00:16:31 +0000 |
| commit | 58418ffa32a0eeacfe59fab70449bbcef7c5680a (patch) | |
| tree | 13cb99c43793794f7649ecaf1482ca293865647b /clang/test/Sema/attr-mode.c | |
| parent | 2727d1b221d70f742afac0fa5dbaf445b14eb56c (diff) | |
| download | bcm5719-llvm-58418ffa32a0eeacfe59fab70449bbcef7c5680a.tar.gz bcm5719-llvm-58418ffa32a0eeacfe59fab70449bbcef7c5680a.zip | |
Make ProcessDeclAttributes walk the declarator structure pulling
decl attributes out of the various places they can hide. This makes
us correctly reject things like this:
t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^
because you can't make a pointer be HImode.
llvm-svn: 52876
Diffstat (limited to 'clang/test/Sema/attr-mode.c')
| -rw-r--r-- | clang/test/Sema/attr-mode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-mode.c b/clang/test/Sema/attr-mode.c index 4eb1399071d..0f8d5da24a6 100644 --- a/clang/test/Sema/attr-mode.c +++ b/clang/test/Sema/attr-mode.c @@ -13,3 +13,5 @@ typedef int invalid_2 __attribute((mode())); // expected-error{{attribute requir typedef int invalid_3 __attribute((mode(II))); // expected-error{{unknown machine mode}} typedef struct {int i,j,k;} invalid_4 __attribute((mode(SI))); // expected-error{{mode attribute only supported for integer and floating-point types}} typedef float invalid_5 __attribute((mode(SI))); // expected-error{{type of machine mode does not match type of base type}} + +int **__attribute((mode(QI)))* i32; // expected-error{{mode attribute}} |

