http://llvm.org/bugs/show_bug.cgi?id=13653
Bug #: 13653
Summary: Warn on self assignment with explicit cast
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Clang should warn on:
struct foo { ... };
foo f;
f = foo(f);
because echristo made this mistake once.
We currently only warn on self assignment of builtin types (int, etc), not user
defined types (presumably because they might have interesting/deliberate side
effects - though I haven't confirmed that this is the reason for the choice).
The case above may be sufficiently uncommon that the bug/non-bug ratio is high
enough to warn.
--
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