[LLVMbugs] [Bug 14482] New: "using declaration requires a qualified name" diag should have a fixit to insert the right qualifier if it's unique
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 2 12:31:18 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14482
Bug #: 14482
Summary: "using declaration requires a qualified name" diag
should have a fixit to insert the right qualifier if
it's unique
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat test.cc
class A {
protected:
void f() {}
};
class B : public A {
public:
using f;
};
int main() {
B b;
b.f();
}
$ clang -c test.cc
test.cc:8:9: error: using declaration requires a qualified name
using f;
^
test.cc:13:5: error: 'f' is a protected member of 'A'
b.f();
^
test.cc:3:8: note: declared protected here
void f() {}
^
2 errors generated.
SemaDeclCXX's BuildUsingDeclaration() already does a lookup after emitting
err_using_requires_qualname. It could do the lookup first, and suggest
inserting the right prefix if the lookup is isSingleResult().
--
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