[LLVMbugs] [Bug 20626] New: Typo correction removing base class specificer causes assertion failure later
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 11 16:10:47 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20626
Bug ID: 20626
Summary: Typo correction removing base class specificer causes
assertion failure later
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: rtrieu at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
test.cc:
class A {
public:
void Foo() {};
};
class B {};
class C : public A, public B {
void Run() {
B::Foo();
}
};
commandline:
clang -fsyntax-only test.cc
assertion:
lib/Sema/SemaDeclCXX.cpp:1715
Assertion `DerivationOkay && "Can only be used with a derived-to-base
conversion"' failed.
diagnostic messages before crash:
test.cc:10:5: error: no member named 'Foo' in 'B'; did you mean simply 'Foo'?
B::Foo();
^~~~~~
Foo
test.cc:3:8: note: 'Foo' declared here
void Foo() {};
^
Theory:
At SemaExpr.cpp:1921, "B::foo();" is corrected to "foo();" Later, at
SemaDeclCXX.cpp:1715, foo() is known to be from class A, but it still performs
a class B is derived from class A check, as if the "B::" was still there.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140811/e9e4d4e1/attachment.html>
More information about the llvm-bugs
mailing list