-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix Issue #6443: spurrious auto-parsing due to @ class, pair, __pair_base and enums #6445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8d2567b
9ca6572
72c723b
cd04b64
2787835
c7930cf
fe77942
d51fa31
19f417d
94b5a72
e311a8a
84cb8a5
2c274dc
9b1058a
2fb16c9
3936c2f
0005d17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -842,12 +842,12 @@ void TClassEdit::GetNormalizedName(std::string &norm_name, std::string_view name | |
| TClassEdit::TSplitType splitname(norm_name.c_str(),(TClassEdit::EModType)(TClassEdit::kLong64 | TClassEdit::kDropStd | TClassEdit::kDropStlDefault | TClassEdit::kKeepOuterConst)); | ||
| splitname.ShortType(norm_name, TClassEdit::kDropStd | TClassEdit::kDropStlDefault | TClassEdit::kResolveTypedef | TClassEdit::kKeepOuterConst); | ||
|
|
||
| if (splitname.fElements.size() == 4 && (splitname.fElements[0] == "std::pair" || splitname.fElements[0] == "pair")) { | ||
| if (splitname.fElements.size() == 4 && (splitname.fElements[0] == "std::pair" || splitname.fElements[0] == "pair" || splitname.fElements[0] == "__pair_base")) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually ... that's right .. the test for std::pair is here superfluous ... |
||
| // We don't want to lookup the std::pair itself. | ||
| std::string first, second; | ||
| GetNormalizedName(first, splitname.fElements[1]); | ||
| GetNormalizedName(second, splitname.fElements[2]); | ||
| norm_name = "pair<" + first + "," + second; | ||
| norm_name = splitname.fElements[0] + "<" + first + "," + second; | ||
| if (!second.empty() && second.back() == '>') | ||
| norm_name += " >"; | ||
| else | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you not use
IsStdPairhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. The test is also on the base class name (
__pair_base) and technically the name can have wild spelling. I.e. the input name (unsplit and unnormalized of course) could be "std :: pair <" and the split name lacks the<that IsStdPair expects.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here I mean that I need to do the test after the call to Split to remove the problem with spelling (and then the name does not have the "<" and thus IsStdPair is not applicable.