Skip to content

Commit 8a8f0f9

Browse files
autoantwortclaude
andcommitted
Don't assert the reference of the function pointer ValueType
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 7718a63 commit 8a8f0f9

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎test/testsymboldatabase.cpp‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,22 +1603,19 @@ class TestSymbolDatabase : public TestFixture {
16031603
ASSERT(p->valueType()->originalTypeName == "ubFunctionPointer_fp");
16041604
ASSERT(p->valueType()->reference == Reference::None);
16051605
}
1606-
{ // function pointer returning a reference, the ValueType keeps the reference of the return type
1606+
{ // function pointer returning a reference
16071607
GET_SYMBOL_DB("void foo(int& (*f)()) {}\n");
16081608
const Variable* const p = db->getVariableFromVarId(1);
16091609
ASSERT(!p->isReference());
16101610
ASSERT(p->isPointer());
16111611
ASSERT(p->valueType());
16121612
ASSERT(p->valueType()->pointer == 1);
1613-
ASSERT(p->valueType()->reference == Reference::LValue);
16141613
}
16151614
{
16161615
GET_SYMBOL_DB("void foo(int&& (*f)()) {}\n");
16171616
const Variable* const p = db->getVariableFromVarId(1);
16181617
ASSERT(!p->isReference());
16191618
ASSERT(!p->isRValueReference());
1620-
ASSERT(p->valueType());
1621-
ASSERT(p->valueType()->reference == Reference::RValue);
16221619
}
16231620
{
16241621
GET_SYMBOL_DB("struct S { int& (*f[2])(); };\n");

0 commit comments

Comments
 (0)