-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix #14413 : Add tag line and column in typedef-info in dump file #8134
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
base: main
Are you sure you want to change the base?
Conversation
3678766 to
4ab71fc
Compare
4ab71fc to
812f3f7
Compare
812f3f7 to
4d5a1f8
Compare
|
| "}\n"); | ||
| ASSERT_EQUALS(" <typedef-info>\n" | ||
| " <info name=\"fp16\" file=\"file.c\" line=\"2\" column=\"1\" used=\"1\" isFunctionPointer=\"1\">\n" | ||
| " <info name=\"fp16\" file=\"file.c\" line=\"2\" column=\"1\" tagline=\"2\" tagcolumn=\"17\" used=\"1\" isFunctionPointer=\"1\">\n" |
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.
as far as I see there is no tagname in any typedef in this example. I think a tagname always follows after a struct/enum keyword.
| typedefInfo.tagColumn = typedefInfo.column; | ||
| typedefInfo.used = false; | ||
| typedefInfo.isFunctionPointer = isFunctionPointer(typeName); | ||
| if (typedefInfo.isFunctionPointer) { |
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 know we talked about it but I feel skeptic about removing this condition.
Maybe you can search for the tagname like this:
if (Token::Match(typeDef->next(), "struct|enum|class|union %name% {") && typeDef->strAt(2) == typeName->str())
typedefInfo.tagToken = typeDef->tokAt(2);
else
typedefInfo.tagToken = nullptr;
There might be some alternative syntax we want to handle later but we could start with this.



No description provided.