http://llvm.org/bugs/show_bug.cgi?id=10209
Summary: Num arg handling seems incorrect in ownership
attribute
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
prompt$ clang -x c -
void bar() __attribute__((ownership_returns(foo, 1, 2)));
Returns:
<stdin>:1:27: error: attribute requires exactly 3 arguments
void bar() __attribute__((ownership_returns(foo, 1, 2)));
^
1 error generated.
I gave it 3 arguments...
In the ownership returns case in SemaDeclAttr.cpp, checking for the number of
arguments is very different from the other cases:
if (AL.getNumArgs() > 1) {
S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments)
<< AL.getNumArgs() + 1;
return;
Should the number of args for AL be exactly 1? Or 1 or 0? Or 2? Or any number
greater than or equal to 2?
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs