parent
7ccffe7761
commit
463ef2e71e
|
@ -2510,7 +2510,7 @@ const Function* Scope::findFunction(const Token *tok) const
|
||||||
for (std::size_t i = 0; i < definedType->derivedFrom.size(); ++i) {
|
for (std::size_t i = 0; i < definedType->derivedFrom.size(); ++i) {
|
||||||
const Type *base = definedType->derivedFrom[i].type;
|
const Type *base = definedType->derivedFrom[i].type;
|
||||||
if (base && base->classScope) {
|
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;
|
continue;
|
||||||
const Function * func = base->classScope->findFunction(tok);
|
const Function * func = base->classScope->findFunction(tok);
|
||||||
if (func)
|
if (func)
|
||||||
|
|
|
@ -200,6 +200,7 @@ private:
|
||||||
TEST_CASE(symboldatabase36); // ticket #4892 (segmentation fault)
|
TEST_CASE(symboldatabase36); // ticket #4892 (segmentation fault)
|
||||||
TEST_CASE(symboldatabase37);
|
TEST_CASE(symboldatabase37);
|
||||||
TEST_CASE(symboldatabase38); // ticket #5125 (infinite recursion)
|
TEST_CASE(symboldatabase38); // ticket #5125 (infinite recursion)
|
||||||
|
TEST_CASE(symboldatabase39); // ticket #5120 (infinite recursion)
|
||||||
|
|
||||||
TEST_CASE(isImplicitlyVirtual);
|
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() {
|
void isImplicitlyVirtual() {
|
||||||
{
|
{
|
||||||
GET_SYMBOL_DB("class Base {\n"
|
GET_SYMBOL_DB("class Base {\n"
|
||||||
|
|
Loading…
Reference in New Issue