-
Couldn't load subscription status.
- Fork 1.5k
fixed some -Wnrvo Clang compiler warnings
#7883
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
|
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 know.. of course I want to have performance. But we obfuscate the code in various places that are probably not hotspots.
I feel that the original code is more well written and readable.
| checkRecursive(expr, startEndTokens.first, startEndTokens.second->next(), exprVarIds, local, true, depth); | ||
| if (result.type != Result::Type::NONE) | ||
| return result; | ||
| { |
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.
this is quite pedantic by clang imho. FwdAnalysis::Result is small and simple data. But yes if we want to turn on the warning then you have to fix all warnings so I guess there's not much we can do.
| return "0.0"; | ||
| if (s.find_first_of(".e") == std::string::npos) | ||
| return s + ".0"; | ||
| s = "0.0"; |
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.
hmm I like the old code better here from a readability point of view.
| result = execute(elseStart->scope()); | ||
| } else { | ||
| return {unknown()}; | ||
| result = {unknown()}; |
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.
it is less obvious what happens here. if the loop continues then other results can be returned.. so I want to see an unconditional return.
| overflow = true; | ||
| indexValues.push_back(values.front()); | ||
| } | ||
| if (overflow) |
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.
this looks more weird imho.



No description provided.