http://llvm.org/bugs/show_bug.cgi?id=13520
Bug #: 13520
Summary: -Wunused-private-field false positive after error
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This code triggers a -Wunused-private-field false positive on C::S::k:
class C {
struct X {
int n;
} x;
public:
class S {
private:
int k;
C *p;
public:
S(int k, C *p) : k(k), p(p) {}
void f() { p->x.n = k; }
};
void f(UnknownTypeName utn);
};
I guess we're setting C to be invalid, and so discarding the use of 'k' within
C::S::f.
(To see this in the wild, introduce a bad type name into any Sema member
function declaration...)
--
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