[core] Fix improper name normalization in KeepNParams#21567
[core] Fix improper name normalization in KeepNParams#21567silverweed merged 2 commits intoroot-project:masterfrom
Conversation
aa7739b to
0fd3044
Compare
Test Results 21 files 21 suites 3d 5h 31m 31s ⏱️ Results for commit 2c5a386. ♻️ This comment has been updated with latest results. |
0fd3044 to
c37967c
Compare
|
Test fails on mac with: which is concerning... |
The algorithm was not recording any default arguments into argsToKeep,
but it actually needs to keep them as long as they are followed by a
non-default argument.
This would cause issues such as this:
// std::less<int> is a default argument, but MyAlloc is not
using MyMap = std::map<int, int, std::less<int>, MyAlloc>;
TClass::GetClass("MyMap")->GetName() # prints "map<int,int,MyAlloc>" !
c37967c to
f4e0d07
Compare
|
Note, the new test shows a behavior different between Linux and MacOS for the selected template instantiation. Difference between Linux/runtime_cxxmodules and macOS/runtime_cxxmodules execution of On linux/runtime_cxxmodules we get the incorrect: std::map<int, int> Inside of TClassEdit::GetNormalizedName, in both case, the On linux the stage It seems that the differences is the fact that in the ‘they are not equal’ case, the It is not yet determined why this difference exists but could exist in other circumstances. So let’s explore why And the following patch cures the symptoms: On MacOS: On Linux: |
|
@pcanal thanks for the investigation! I updated the PR with your patch as well as the wrong test. |
37b67b8 to
2c5a386
Compare
The algorithm was not recording any default arguments into argsToKeep, but it actually needs to keep them as long as they are followed by a non-default argument.
This would cause issues such as this:
NOTE
I am not familiar with the Cling codebase so this fix might be missing something or be wrong for some other reason. The TClassEdit tests are passing, at least, but I kindly ask Cling experts to scrutinize this change thoroughly.
Checklist:
This PR fixes #