[LLVMbugs] [Bug 12374] New: Warn on usage of -> on array
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 27 10:53:09 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12374
Bug #: 12374
Summary: Warn on usage of -> on array
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jduba at izotope.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Version:
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
compiled with -Weverything
The following should generate a warning:
struct s { void f(); }
int main(int argc, char* argv[]) {
s vals[4];
vals->f();
return 0;
}
it is unlikely that a user wants to access the first element of an array by
using vals->f(); rather than vals[0].f();
--
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