[LLVMbugs] [Bug 11863] New: attribute((nonnull)) not checked on c++ operators
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jan 26 12:48:08 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11863
Bug #: 11863
Summary: attribute((nonnull)) not checked on c++ operators
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Testcase:
struct foo {};
bool operator!=(const foo &, void *) __attribute__((nonnull(2)));
bool test(const foo &f) {
return f != 0;
}
nlewycky at ducttape:~$ g++ str2.cc -fsyntax-only -Wall
str2.cc: In function ‘bool test(const foo&)’:
str2.cc:6: warning: null argument where non-null required (argument 2)
vs.
nlewycky at ducttape:~$ clang++ str2.cc -fsyntax-only -Wall
nlewycky at ducttape:~$
--
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.
More information about the llvm-bugs
mailing list