http://llvm.org/bugs/show_bug.cgi?id=6786
Summary: New parameter to assume function parameters are
nonnull by default
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
The nonnull attribute is kind of nice in theory and static analyzer gives
useful output with them, but since in typical code most parameters are nonnull,
it's annoying to specify it in 99% of function declarations.
So what if there was instead a new parameter that changes the default to assume
that all parameters are nonnull, unless overridden? The overriding could happen
in two ways:
a) nonnull attribute specified for the function and doesn't list some specific
parameter
b) nonnull attribute doesn't work if all parameters can be null, so there would
also have to be a new null attribute that works opposite to what nonnull does.
There are of course them potential problems with false positive warnings with
libc and other external libraries, but I'm hoping they won't cause too much
trouble.
--
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