diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-11 22:36:48 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-11 22:36:48 +0000 |
commit | 623a389f623dfef44f07211bd12fbd2a93db09e3 (patch) | |
tree | fdaeaea0d3864dad9983412fe9f31d2c57912c81 /test/Verifier | |
parent | 10603e0c84d15f61443e8b17bc35f98cc46606d9 (diff) |
Do not allow attributes beyond a function's last
parameter, even if it is a varargs function. Do
allow attributes on the varargs part of a call,
but not beyond the last argument. Only allow
selected attributes to be on the varargs part of
a call (currently only 'byval' is allowed). The
reasoning here is that most attributes, eg inreg,
simply make no sense here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/2008-01-11-VarargAttrs.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Verifier/2008-01-11-VarargAttrs.ll b/test/Verifier/2008-01-11-VarargAttrs.ll new file mode 100644 index 0000000000..1f4c9c72b4 --- /dev/null +++ b/test/Verifier/2008-01-11-VarargAttrs.ll @@ -0,0 +1,10 @@ +; RUN: not llvm-as < %s + + %struct = type { } + +declare void @foo(...) + +define void @bar() { + call void (...)* @foo(%struct* inreg null ) + ret void +} |