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
Skip function bodies? #297
Comments
Thanks for the proposition.
This seems valid to me. As for disabling the warnings. Can't we just filter them out? How many of different kinds of warnings are there? I already filter out the warnings related to Overall the addition is welcome. It would be best if we just filter out the (potentially?) wrong warnings if the setting is on. If we cannot do this, I don't know what would be a good way. We should inform the user that we disable a setting if we do it automatically. |
Hello. I created PR #325 about goto definition/declaration. If we skip function bodies, will goto_declaration work to local variables, declared inside function body? |
When creating a translation unit, you can pass the option to skip parsing the function bodies (
TU.PARSE_SKIP_FUNCTION_BODIES
). This greatly improves parsing the file when it first loads. For the sake of completions, parsing function bodies is also not necessary. However, you may get strange warnings about undefined functions even if they're defined. Because of this, if one would implement this feature, it would be incompatible with the inline warnings/errors feature. I would like to implement this but I'd like to hear your opinions about this first.So, I propose a new setting called
"skip_function_bodies"
. By default it is set tofalse
. If it's set totrue
, inline warnings/errors are disabled, but parse time is improved.The text was updated successfully, but these errors were encountered: