Skip to content

Commit 9f3b8bf

Browse files
mizvekovalandefreitas
authored andcommitted
fix: handle constructor from reference to array
isCopyOrMoveConstructorOrAssignment currently doesn't handle a constructor from a reference to array. I am not sure why this is not seen on CI, but it is reproducible from llvm 20.1.7, as available in macos homebrew.
1 parent 5aa5691 commit 9f3b8bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/Metadata/Finalizers/Javadoc/Function.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ isCopyOrMoveConstructorOrAssignment(FunctionInfo const& I)
6060
auto const& paramRefType = get<RefType const&>(paramType);
6161
auto const& paramRefPointee = paramRefType.PointeeType;
6262
MRDOCS_CHECK_OR(paramRefPointee, false);
63-
auto const& paramRefPointeeNamed = get<NamedTypeInfo const&>(paramRefPointee);
64-
MRDOCS_CHECK_OR(paramRefPointeeNamed.Name, false);
65-
auto const& paramName = paramRefPointeeNamed.Name;
63+
auto const* paramRefPointeeNamed = get<NamedTypeInfo const*>(paramRefPointee);
64+
if (!paramRefPointeeNamed)
65+
return false;
66+
MRDOCS_CHECK_OR(paramRefPointeeNamed->Name, false);
67+
auto const& paramName = paramRefPointeeNamed->Name;
6668
MRDOCS_CHECK_OR(paramName, false);
6769
auto const& paramRefPointeeNamedName = paramName->Name;
6870
MRDOCS_CHECK_OR(!paramRefPointeeNamedName.empty(), false);

0 commit comments

Comments
 (0)