Merge pull request #193 from simartin/ticket_5120
Ticket #5120: New test case, that works now that #5125 is fixed
This commit is contained in:
commit
d50eef43a1
|
@ -2510,7 +2510,7 @@ const Function* Scope::findFunction(const Token *tok) const
|
|||
for (std::size_t i = 0; i < definedType->derivedFrom.size(); ++i) {
|
||||
const Type *base = definedType->derivedFrom[i].type;
|
||||
if (base && base->classScope) {
|
||||
if (base->classScope == this) // Ticket #5125: Recursive class; tok should have been found already
|
||||
if (base->classScope == this) // Ticket #5120, #5125: Recursive class; tok should have been found already
|
||||
continue;
|
||||
const Function * func = base->classScope->findFunction(tok);
|
||||
if (func)
|
||||
|
|
|
@ -200,6 +200,7 @@ private:
|
|||
TEST_CASE(symboldatabase36); // ticket #4892 (segmentation fault)
|
||||
TEST_CASE(symboldatabase37);
|
||||
TEST_CASE(symboldatabase38); // ticket #5125 (infinite recursion)
|
||||
TEST_CASE(symboldatabase39); // ticket #5120 (infinite recursion)
|
||||
|
||||
TEST_CASE(isImplicitlyVirtual);
|
||||
|
||||
|
@ -1652,6 +1653,10 @@ private:
|
|||
"};");
|
||||
}
|
||||
|
||||
void symboldatabase39() { // ticket #5120
|
||||
check("struct V : { public case {} ; struct U : U void { V *f (int x) (x) } }");
|
||||
}
|
||||
|
||||
void isImplicitlyVirtual() {
|
||||
{
|
||||
GET_SYMBOL_DB("class Base {\n"
|
||||
|
|
Loading…
Reference in New Issue