diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 15:32:26 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2013-12-04 15:32:26 +0000 |
| commit | 66037479af2ac686d8d9304129643a95decfb1c0 (patch) | |
| tree | aca983c18c6c96d81e8bb00e00f0573e282dba80 /clang/test/Sema | |
| parent | c5f420e129ef0bf767e394b83906946d181a4537 (diff) | |
| download | bcm5719-llvm-66037479af2ac686d8d9304129643a95decfb1c0.tar.gz bcm5719-llvm-66037479af2ac686d8d9304129643a95decfb1c0.zip | |
When parsing ignored attribute arguments, presuming the first argument is an unresolved identifier the same way that we do for unknown arguments. This resolves PR18075, where we regressed the handling of OpenBSD's bounded attribute.
llvm-svn: 196387
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/attr-bounded.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-bounded.c b/clang/test/Sema/attr-bounded.c new file mode 100644 index 00000000000..bf71fedf2d3 --- /dev/null +++ b/clang/test/Sema/attr-bounded.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only %s
+// Make sure OpenBSD's bounded extension is accepted.
+
+typedef long ssize_t;
+typedef unsigned long size_t;
+typedef struct FILE FILE;
+
+ssize_t read(int, void *, size_t)
+ __attribute__((__bounded__(__buffer__,2,3)));
+int readlink(const char *, char *, size_t)
+ __attribute__((__bounded__(__string__,2,3)));
+size_t fread(void *, size_t, size_t, FILE *)
+ __attribute__((__bounded__(__size__,1,3,2)));
+char *getwd(char *)
+ __attribute__((__bounded__(__minbytes__,1,1024)));
\ No newline at end of file |

