Skip to content

Commit dbfcc30

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 7bd1711 commit dbfcc30

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
@@ -1602,22 +1602,19 @@ class TestSymbolDatabase : public TestFixture {
16021602
ASSERT(p->valueType()->originalTypeName == "ubFunctionPointer_fp");
16031603
ASSERT(p->valueType()->reference == Reference::None);
16041604
}
1605-
{ // function pointer returning a reference, the ValueType keeps the reference of the return type
1605+
{ // function pointer returning a reference
16061606
GET_SYMBOL_DB("void foo(int& (*f)()) {}\n");
16071607
const Variable* const p = db->getVariableFromVarId(1);
16081608
ASSERT(!p->isReference());
16091609
ASSERT(p->isPointer());
16101610
ASSERT(p->valueType());
16111611
ASSERT(p->valueType()->pointer == 1);
1612-
ASSERT(p->valueType()->reference == Reference::LValue);
16131612
}
16141613
{
16151614
GET_SYMBOL_DB("void foo(int&& (*f)()) {}\n");
16161615
const Variable* const p = db->getVariableFromVarId(1);
16171616
ASSERT(!p->isReference());
16181617
ASSERT(!p->isRValueReference());
1619-
ASSERT(p->valueType());
1620-
ASSERT(p->valueType()->reference == Reference::RValue);
16211618
}
16221619
{
16231620
GET_SYMBOL_DB("struct S { int& (*f[2])(); };\n");

0 commit comments

Comments
 (0)