http://llvm.org/bugs/show_bug.cgi?id=21021
Bug ID: 21021
Summary: Typo-correct accesses to private members with call to
accessor methods
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
consider:
class Scan {
int build_log_;
public:
int build_log() const { return build_log_; }
};
int f(const Scan& s) {
return s.build_log_;
}
Clang currently says
test.cc:8:12: error: 'build_log_' is a private member of 'Scan'
return s.build_log_;
^
test.cc:2:7: note: implicitly declared private here
int build_log_;
^
1 error generated.
I'd be cool if it'd say something like "did you mean to call the public
accessor build_log()" and offer a typo correction for this.
--
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