Skip to content

Conversation

@guitargeek
Copy link
Contributor

Just like in CppInterOp, set the SuppressElaboration and FullyQualifiedName policies when getting the fully qualified name of a QualType.

Closes the following JIRA ticket:

https://its.cern.ch/jira/browse/ROOT-10150

Just like in CppInterOp, set the `SuppressElaboration` and
`FullyQualifiedName` policies when getting the fully qualified name of a
QualType.

Closes the following JIRA ticket:

https://its.cern.ch/jira/browse/ROOT-10150
@github-actions
Copy link

github-actions bot commented Jul 5, 2025

Test Results

    20 files      20 suites   3d 4h 50m 49s ⏱️
 3 193 tests  3 190 ✅ 0 💤  3 ❌
62 261 runs  62 248 ✅ 0 💤 13 ❌

For more details on these failures, see this check.

Results for commit ea1957a.

EXPECT_EQ("fHash", hashSubfields[0]->GetFieldName());
EXPECT_EQ("std::string", hashSubfields[0]->GetTypeName());
EXPECT_EQ("EdmHash<1>::value_type", hashSubfields[0]->GetTypeAlias());
EXPECT_EQ("EdmHash::value_type", hashSubfields[0]->GetTypeAlias());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is incorrect: EdmHash is a template class and requires template arguments. Clang stores the inner class outside the template instantiation as an optimization, but the type must have arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it's incorrect :( I realized the printing policies are quite brittle in general, and I can't make all cases work. I'll report on the problems I found soon, in a separate GitHub issue I guess.

Comment on lines 223 to +225
// FIXME: This should really be EdmHash<1>::value_typeT<EdmHash<1>::value_type>, but this is the value we get from
// TDataMember::GetFullTypeName right now...
EXPECT_EQ("value_typeT<EdmHash<1>::value_type>", hashSubfields[1]->GetTypeAlias());
EXPECT_EQ("EdmHash::value_typeT<EdmHash::value_type>", hashSubfields[1]->GetTypeAlias());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is equally wrong, the expected outcome is even documented in the comment.

const auto &fdesc = desc.GetFieldDescriptor(desc.FindFieldId("m", fooId));
EXPECT_EQ(fdesc.GetTypeName(), "std::vector<std::int32_t>");
EXPECT_EQ(fdesc.GetTypeAlias(), "MyVec<std::int32_t>");
EXPECT_EQ(fdesc.GetTypeAlias(), "CustomStruct::MyVec<std::int32_t>");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old version may be correct, depending on how you argue: it's the type alias as the user wrote it, inside of CustomStruct which happens to have a typedef...

@ferdymercury
Copy link
Collaborator

Related: #999

@guitargeek
Copy link
Contributor Author

Superseeded by the following PR by @devajithvs, coincidentally opened later the same day, but independently:

Dev should be the better expert to bring this to conclusion 🙂

@guitargeek guitargeek closed this Dec 3, 2025
@guitargeek guitargeek deleted the ROOT-10150 branch December 3, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants