Skip to content
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

Replaced 'tok->next()->link()' by 'tok->linkAt(1)' #6476

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

orbitcowboy
Copy link
Collaborator

@orbitcowboy orbitcowboy commented Jun 1, 2024

Fixes from #6472

@chrchr-github
Copy link
Collaborator

chrchr-github commented Jun 1, 2024

if (Token::Match(tok, "previous ( ) . next|tokAt|strAt|linkAt (") || Token::Match(tok, "next ( ) . previous|tokAt|strAt|linkAt (") ||
should be changed to

if (Token::Match(tok, "previous ( ) . next|tokAt|strAt|link|linkAt (") || Token::Match(tok, "next ( ) . previous|tokAt|strAt|link|linkAt (") ||

@chrchr-github
Copy link
Collaborator

[...]
should be changed to
[...]

Done with other stuff in #6478

@firewave
Copy link
Collaborator

firewave commented Jun 1, 2024

I gave it a small spin.

Clang 17 1,230,369,784 -> 1,231,921,651
Clang 17 (with #6479) 1,231,921,669 -> 1,196,502,795

So when the compiler can inline it, these changes actually make the code faster. 👍

@chrchr-github chrchr-github merged commit 7b22594 into main Jun 1, 2024
63 checks passed
@chrchr-github chrchr-github deleted the fix_TokenLink_warnings branch June 1, 2024 21:33
@firewave
Copy link
Collaborator

firewave commented Jun 1, 2024

callgrind in CI 64,212,820,811 -> 64,288,204,094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants